Updated Branches:
  refs/heads/1.5.1-SNAPSHOT b93032190 -> d4b069996
  refs/heads/1.6.0-SNAPSHOT 4f86e0001 -> 4b51dd05e
  refs/heads/master ffd530135 -> 012efd72d


ACCUMULO-2342 Sleep after we modify a constraint.

We have to wait for the watcher on zk to trigger and propagate down to
the constraint observer so that the mutations won't be incorrectly
rejected and fail these unit tests.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d4b06999
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d4b06999
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d4b06999

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: d4b06999694fc1238fad0a19fd6544520b44a620
Parents: b930321
Author: Josh Elser <els...@apache.org>
Authored: Sat Feb 8 16:10:53 2014 -0500
Committer: Josh Elser <els...@apache.org>
Committed: Sat Feb 8 16:10:53 2014 -0500

----------------------------------------------------------------------
 .../src/test/java/org/apache/accumulo/proxy/SimpleTest.java  | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d4b06999/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
----------------------------------------------------------------------
diff --git a/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java 
b/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
index 9dab290..5573d20 100644
--- a/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
+++ b/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
@@ -934,6 +934,8 @@ public class SimpleTest {
     } catch (MutationsRejectedException e) {}
     
     client.removeConstraint(creds, TABLE_TEST, 1);
+
+    UtilWaitThread.sleep(2000);
     
     writerOptions = new WriterOptions();
     writerOptions.setLatencyMs(10000);
@@ -962,6 +964,9 @@ public class SimpleTest {
     client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
     // constraints
     client.addConstraint(creds, TABLE_TEST, 
NumericValueConstraint.class.getName());
+
+    UtilWaitThread.sleep(2000);
+
     client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", 
"123"));
     
     try {
@@ -970,6 +975,9 @@ public class SimpleTest {
     } catch (MutationsRejectedException ex) {}
     
     client.removeConstraint(creds, TABLE_TEST, 1);
+
+    UtilWaitThread.sleep(2000);
+
     assertEquals(0, client.listConstraints(creds, TABLE_TEST).size());
     client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", 
"x"));
     String scanner = client.createScanner(creds, TABLE_TEST, null);

Reply via email to