ACCUMULO-4185 Use SYNC durability and expect the update to be durable Using LOG is subject to race conditions with RawLocalFileSystem. It is possible that we see or don't see the update which is bad for a test. Using SYNC removes that race condition.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0f6e5ed5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0f6e5ed5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0f6e5ed5 Branch: refs/heads/ACCUMULO-4173 Commit: 0f6e5ed5549132e8d63153fa9a0b9fa10779b264 Parents: 0cb15fa Author: Josh Elser <els...@apache.org> Authored: Mon Apr 11 13:52:49 2016 -0400 Committer: Josh Elser <els...@apache.org> Committed: Mon Apr 11 13:52:49 2016 -0400 ---------------------------------------------------------------------- .../test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f6e5ed5/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java b/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java index 6338e00..b388cbf 100644 --- a/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java +++ b/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java @@ -111,7 +111,7 @@ public class ProxyDurabilityIT extends ConfigurableMacIT { assertEquals(0, count(tableName)); ConditionalWriterOptions cfg = new ConditionalWriterOptions(); - cfg.setDurability(Durability.LOG); + cfg.setDurability(Durability.SYNC); String cwriter = client.createConditionalWriter(login, tableName, cfg); ConditionalUpdates updates = new ConditionalUpdates(); updates.addToConditions(new Condition(new Column(bytes("cf"), bytes("cq"), bytes("")))); @@ -120,7 +120,7 @@ public class ProxyDurabilityIT extends ConfigurableMacIT { assertEquals(ConditionalStatus.ACCEPTED, status.get(bytes("row"))); assertEquals(1, count(tableName)); restartTServer(); - assertEquals(0, count(tableName)); + assertEquals(1, count(tableName)); proxyServer.stop(); }