Call append on a column twice, the first time to create it, the second to append the new value.
()
| 250 | * append the new value. |
| 251 | */ |
| 252 | @Test |
| 253 | public void appendTwiceNoReturnRead() throws Exception { |
| 254 | client.setFlushInterval(FAST_FLUSH); |
| 255 | truncateTable(table); |
| 256 | final double write_time = System.currentTimeMillis(); |
| 257 | final AppendRequest append = new AppendRequest(table, "a2", family, "q", "val"); |
| 258 | final AppendRequest append2 = new AppendRequest(table, "a2", family, "q", "2ndv"); |
| 259 | final GetRequest get = new GetRequest(table, "a2", family, "q"); |
| 260 | assertNull(client.append(append).join()); |
| 261 | assertNull(client.append(append2).join()); |
| 262 | final ArrayList<KeyValue> kvs = client.get(get).join(); |
| 263 | assertSizeIs(1, kvs); |
| 264 | final KeyValue kv = kvs.get(0); |
| 265 | assertEq("a2", kv.key()); |
| 266 | assertEq(family, kv.family()); |
| 267 | assertEq("q", kv.qualifier()); |
| 268 | assertEq("val2ndv", kv.value()); |
| 269 | final double kvts = kv.timestamp(); |
| 270 | assertEquals(write_time, kvts, 5000.0); // Within five seconds. |
| 271 | } |
| 272 | |
| 273 | @Test |
| 274 | public void appendTwiceBatchedNoReturnRead() throws Exception { |
nothing calls this directly
no test coverage detected