accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/6] accumulo git commit: ACCUMULO-3889 Make ScanIdIT a bit more reliable for TNFE
Date Thu, 04 Jun 2015 04:13:28 GMT
ACCUMULO-3889 Make ScanIdIT a bit more reliable for TNFE


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

Branch: refs/heads/1.7
Commit: b754d12125331ee20fe9cdc65f4712706e93ac98
Parents: 9a4dd30
Author: Josh Elser <elserj@apache.org>
Authored: Wed Jun 3 23:52:03 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Wed Jun 3 23:52:03 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/test/functional/ScanIdIT.java | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b754d121/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java
index de4a47e..726ab8b 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java
@@ -17,6 +17,7 @@
 package org.apache.accumulo.test.functional;
 
 import static com.google.common.base.Charsets.UTF_8;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -140,7 +141,22 @@ public class ScanIdIT extends AccumuloClusterIT {
 
     for (String tserver : tservers) {
 
-      List<ActiveScan> activeScans = conn.instanceOperations().getActiveScans(tserver);
+      List<ActiveScan> activeScans = null;
+      for (int i = 0; i < 10; i++) {
+        try {
+          activeScans = conn.instanceOperations().getActiveScans(tserver);
+          break;
+        } catch (AccumuloException e) {
+          if (e.getCause() instanceof TableNotFoundException) {
+            log.debug("Got TableNotFoundException, will retry");
+            Thread.sleep(200);
+            continue;
+          }
+          throw e;
+        }
+      }
+
+      assertNotNull("Repeatedly got exception trying to active scans", activeScans);
 
       log.debug("TServer {} has {} active scans", tserver, activeScans.size());
 


Mime
View raw message