accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-3098 fix timeout
Date Wed, 03 Sep 2014 18:23:01 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6.1-SNAPSHOT 42c8808d7 -> fee5ec4f0


ACCUMULO-3098 fix timeout


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

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: fee5ec4f061d0244393e149020998613d37ecf27
Parents: 42c8808
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Wed Sep 3 14:20:16 2014 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Wed Sep 3 14:22:43 2014 -0400

----------------------------------------------------------------------
 .../accumulo/test/functional/MonitorLoggingIT.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fee5ec4f/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
index 331a546..b843a1d 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
@@ -49,14 +49,14 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
   }
 
   private static final int NUM_LOCATION_PASSES = 5;
-  private static final int LOCATION_DELAY = 5000;
+  private static final int LOCATION_DELAY_SECS = 5;
 
   @Override
   protected int defaultTimeoutSeconds() {
-    return (NUM_LOCATION_PASSES + 2) * LOCATION_DELAY;
+    return 30 + ((NUM_LOCATION_PASSES + 2) * LOCATION_DELAY_SECS);
   }
 
-  @Test
+  @Test(timeout = 30 + ((NUM_LOCATION_PASSES + 2) * LOCATION_DELAY_SECS * 1000))
   public void logToMonitor() throws Exception {
     // Start the monitor.
     log.debug("Starting Monitor");
@@ -65,15 +65,15 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
     // Get monitor location to ensure it is running.
     String monitorLocation = null;
     for (int i = 0; i < NUM_LOCATION_PASSES; i++) {
-      Thread.sleep(LOCATION_DELAY);
+      Thread.sleep(LOCATION_DELAY_SECS * 1000);
       try {
         monitorLocation = getMonitor();
         break;
       } catch (KeeperException e) {
-        log.debug("Monitor not up yet, trying again in " + LOCATION_DELAY + " ms");
+        log.debug("Monitor not up yet, trying again in " + LOCATION_DELAY_SECS + " secs");
       }
     }
-    assertNotNull("Monitor failed to start within " + (LOCATION_DELAY * NUM_LOCATION_PASSES)
+ " ms", monitorLocation);
+    assertNotNull("Monitor failed to start within " + (LOCATION_DELAY_SECS * NUM_LOCATION_PASSES)
+ " secs", monitorLocation);
     log.debug("Monitor running at " + monitorLocation);
 
     // Attempt a scan with an invalid iterator to force a log message in the monitor.
@@ -89,7 +89,7 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
 
     String result = "";
     while(true) {
-      Thread.sleep(LOCATION_DELAY);  // extra precaution to ensure monitor has opportunity
to log
+      Thread.sleep(LOCATION_DELAY_SECS * 1000);  // extra precaution to ensure monitor has
opportunity to log
 
       // Verify messages were received at the monitor.
       URL url = new URL("http://" + monitorLocation + "/log");


Mime
View raw message