accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/3] accumulo git commit: ACCUMULO-3828 Repeatedly check constraint in proxy tests
Date Tue, 19 May 2015 00:24:18 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.7 5b76afc07 -> 8e13ec4d3
  refs/heads/master c115bdfb8 -> 3b39a9e32


ACCUMULO-3828 Repeatedly check constraint in proxy tests

Also make the test cleanup method a bit smarter.


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

Branch: refs/heads/1.7
Commit: 8e13ec4d35206d4cbbe9158c8ee6b1f0fead1c01
Parents: 5b76afc
Author: Josh Elser <elserj@apache.org>
Authored: Mon May 18 19:26:27 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Mon May 18 19:26:27 2015 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/proxy/SimpleProxyBase.java  | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8e13ec4d/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
index eb7d661..cf2d3ab 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
@@ -201,7 +201,9 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
   public void teardown() throws Exception {
     if (null != table) {
       try {
-        client.deleteTable(creds, table);
+        if (client.tableExists(creds, table)) {
+          client.deleteTable(creds, table);
+        }
       } catch (Exception e) {
         log.warn("Failed to delete test table", e);
       }
@@ -1113,6 +1115,12 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     writerOptions.setThreads(1);
     writerOptions.setTimeoutMs(100000);
 
+    Map<String,Integer> constraints = client.listConstraints(creds, table);
+    while (!constraints.containsKey(NumericValueConstraint.class.getName())) {
+      log.info("Constraints don't contain NumericValueConstraint");
+      Thread.sleep(2000);
+    }
+
     String batchWriter = client.createWriter(creds, table, writerOptions);
     client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
     client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
@@ -1127,6 +1135,12 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
     client.removeConstraint(creds, table, 2);
 
+    constraints = client.listConstraints(creds, table);
+    while (constraints.containsKey(NumericValueConstraint.class.getName())) {
+      log.info("Constraints still contains NumericValueConstraint");
+      Thread.sleep(2000);
+    }
+
     assertScan(new String[][] {}, table);
 
     UtilWaitThread.sleep(2000);


Mime
View raw message