()
| 293 | } |
| 294 | |
| 295 | @Test |
| 296 | public void appendTwiceBatchedReturnRead() throws Exception { |
| 297 | truncateTable(table); |
| 298 | final double write_time = System.currentTimeMillis(); |
| 299 | final AppendRequest append = new AppendRequest(table, "a2", family, "q", "val"); |
| 300 | append.returnResult(true); |
| 301 | final AppendRequest append2 = new AppendRequest(table, "a2", family, "q", "2ndv"); |
| 302 | append2.returnResult(true); |
| 303 | final GetRequest get = new GetRequest(table, "a2", family, "q"); |
| 304 | final ArrayList<Deferred<Object>> deferreds = new ArrayList<Deferred<Object>>(2); |
| 305 | deferreds.add(client.append(append)); |
| 306 | deferreds.add(client.append(append2)); |
| 307 | Deferred.group(deferreds).join(); |
| 308 | final ArrayList<KeyValue> kvs = client.get(get).join(); |
| 309 | assertSizeIs(1, kvs); |
| 310 | final KeyValue kv = kvs.get(0); |
| 311 | assertEq("a2", kv.key()); |
| 312 | assertEq(family, kv.family()); |
| 313 | assertEq("q", kv.qualifier()); |
| 314 | assertEq("val2ndv", kv.value()); |
| 315 | final double kvts = kv.timestamp(); |
| 316 | assertEquals(write_time, kvts, 5000.0); // Within five seconds. |
| 317 | } |
| 318 | |
| 319 | @Test |
| 320 | public void basicScanMultipleRegions() throws Exception { |
nothing calls this directly
no test coverage detected