Regression test for issue #40 (which was actually Netty bug #474).
()
| 2222 | |
| 2223 | /** Regression test for issue #40 (which was actually Netty bug #474). */ |
| 2224 | @Test |
| 2225 | public void regression40() throws Exception { |
| 2226 | // Cause a META lookup first to avoid some DEBUG-level spam due to the |
| 2227 | // long key below. |
| 2228 | client.ensureTableFamilyExists(table, family).join(); |
| 2229 | client.setFlushInterval(FAST_FLUSH); |
| 2230 | final byte[] table = TestIntegration.table.getBytes(); |
| 2231 | // 980 was empirically found to be the minimum size with which |
| 2232 | // Netty bug #474 gets triggered. Bug got fixed in Netty 3.5.8. |
| 2233 | final byte[] key = new byte[980]; |
| 2234 | key[0] = 'k'; |
| 2235 | key[1] = '4'; |
| 2236 | key[2] = '0'; |
| 2237 | key[key.length - 1] = '*'; |
| 2238 | final byte[] family = TestIntegration.family.getBytes(); |
| 2239 | final byte[] qual = { 'q' }; |
| 2240 | final PutRequest put = new PutRequest(table, key, family, qual, |
| 2241 | new byte[0] /* empty */); |
| 2242 | final GetRequest get = new GetRequest(table, key); |
| 2243 | client.put(put).join(); |
| 2244 | final ArrayList<KeyValue> kvs = client.get(get).join(); |
| 2245 | assertSizeIs(1, kvs); |
| 2246 | KeyValue kv = kvs.get(0); |
| 2247 | assertEq("q", kv.qualifier()); |
| 2248 | assertEq("", kv.value()); |
| 2249 | } |
| 2250 | |
| 2251 | /** Regression test for issue #41. */ |
| 2252 | @Test |
nothing calls this directly
no test coverage detected