accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] git commit: ACCUMULO-2405 check more frequently for the delete entries
Date Thu, 27 Feb 2014 15:59:34 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master c5165ca10 -> f83f5264b


ACCUMULO-2405 check more frequently for the delete entries


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

Branch: refs/heads/master
Commit: c530f389cc9b3504d469f0c9a974b4a7ed415b9f
Parents: f71720a
Author: Eric Newton <eric.newton@gmail.com>
Authored: Thu Feb 27 10:58:55 2014 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Thu Feb 27 10:59:08 2014 -0500

----------------------------------------------------------------------
 .../accumulo/test/functional/FunctionalTestUtils.java |  7 +++++++
 .../apache/accumulo/test/functional/MetadataIT.java   | 14 ++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c530f389/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
b/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
index c863735..28a1bf2 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
@@ -171,4 +171,11 @@ public class FunctionalTestUtils {
     return result;
   }
 
+  public static int count(Iterable<Entry<Key, Value>> i) {
+    int count = 0;
+    for (@SuppressWarnings("unused") Entry<Key,Value> entry : i)
+      count++;
+    return count;
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c530f389/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java b/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
index e092a01..3df7381 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
@@ -92,15 +92,13 @@ public class MetadataIT extends SimpleMacIT {
       c.tableOperations().create(tableName);
     }
     c.tableOperations().merge(MetadataTable.NAME, null, null);
-    UtilWaitThread.sleep(2 * 1000);
-    Scanner s = c.createScanner(RootTable.NAME, Authorizations.EMPTY);
-    s.setRange(MetadataSchema.DeletesSection.getRange());
-    int count = 0;
-    for (@SuppressWarnings("unused")
-    Entry<Key,Value> e : s) {
-      count++;
+    while (true) {
+      Scanner s = c.createScanner(RootTable.NAME, Authorizations.EMPTY);
+      s.setRange(MetadataSchema.DeletesSection.getRange());
+      if (FunctionalTestUtils.count(s) > 0)
+        break;
+      UtilWaitThread.sleep(100);
     }
-    assertTrue(count > 0);
     assertEquals(0, c.tableOperations().listSplits(MetadataTable.NAME).size());
   }
 


Mime
View raw message