MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / regression41

Method regression41

test/TestIntegration.java:2252–2272  ·  view source on GitHub ↗

Regression test for issue #41.

()

Source from the content-addressed store, hash-verified

2250
2251 /** Regression test for issue #41. */
2252 @Test
2253 public void regression41() throws Exception {
2254 client.setFlushInterval(SLOW_FLUSH);
2255 final byte[] table = TestIntegration.table.getBytes();
2256 final byte[] key = "cnt".getBytes();
2257 final byte[] family = TestIntegration.family.getBytes();
2258 final byte[] qual = { 'q' };
2259 final DeleteRequest del = new DeleteRequest(table, key, family, qual);
2260 del.setBufferable(false);
2261 client.delete(del).join();
2262 final int iterations = 100000;
2263 for (int i = 0; i < iterations; i++) {
2264 bufferIncrement(table, key, family, qual, 1);
2265 }
2266 client.flush().joinUninterruptibly();
2267 final GetRequest get = new GetRequest(table, key)
2268 .family(family).qualifier(qual);
2269 final ArrayList<KeyValue> kvs = client.get(get).join();
2270 assertSizeIs(1, kvs);
2271 assertEquals(iterations, Bytes.getLong(kvs.get(0).value()));
2272 }
2273
2274 private static <T> void assertSizeIs(final int size,
2275 final Collection<T> list) {

Callers

nothing calls this directly

Calls 11

bufferIncrementMethod · 0.95
assertSizeIsMethod · 0.95
getLongMethod · 0.95
setFlushIntervalMethod · 0.80
setBufferableMethod · 0.80
deleteMethod · 0.80
qualifierMethod · 0.65
familyMethod · 0.65
valueMethod · 0.65
flushMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected