You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by bu...@apache.org on 2014/05/13 16:14:04 UTC
[1/3] git commit: ACCUMULO-2798 make MonitorLoggingIT retry.
Repository: accumulo
Updated Branches:
refs/heads/1.6.1-SNAPSHOT a73cf8511 -> e8fab2f89
refs/heads/master e1862d312 -> 89f9c97be
ACCUMULO-2798 make MonitorLoggingIT retry.
Sets a timeout so it doesn't retry forever.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e8fab2f8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e8fab2f8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e8fab2f8
Branch: refs/heads/1.6.1-SNAPSHOT
Commit: e8fab2f89ca8bfaedb13a699e5b3f73551e14bbf
Parents: a73cf85
Author: Sean Busbey <bu...@cloudera.com>
Authored: Mon May 12 20:05:01 2014 -0500
Committer: Sean Busbey <bu...@cloudera.com>
Committed: Tue May 13 08:48:53 2014 -0500
----------------------------------------------------------------------
.../test/functional/MonitorLoggingIT.java | 26 +++++++++++++++-----
1 file changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e8fab2f8/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 2dadafe..c4a2e3d 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
@@ -50,7 +50,12 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
}
private static final int NUM_LOCATION_PASSES = 5;
- private static final long LOCATION_DELAY = 5000L;
+ private static final int LOCATION_DELAY = 5000;
+
+ @Override
+ protected int defaultTimeoutSeconds() {
+ return (NUM_LOCATION_PASSES + 2) * LOCATION_DELAY;
+ }
@Test
public void logToMonitor() throws Exception {
@@ -82,12 +87,21 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
} catch (Exception e) {
// expected, the iterator was bad
}
- Thread.sleep(5000L); // extra precaution to ensure monitor has opportunity to log
- // Verify messages were received at the monitor.
- URL url = new URL("http://" + monitorLocation + "/log");
- log.debug("Fetching web page " + url);
- String result = FunctionalTestUtils.readAll(url.openStream());
+ String result = "";
+ while(true) {
+ Thread.sleep(LOCATION_DELAY); // extra precaution to ensure monitor has opportunity to log
+
+ // Verify messages were received at the monitor.
+ URL url = new URL("http://" + monitorLocation + "/log");
+ log.debug("Fetching web page " + url);
+ result = FunctionalTestUtils.readAll(url.openStream());
+ if (result.contains("<pre class='logevent'>")) {
+ break;
+ }
+ log.debug("No messages found, waiting a little longer...");
+ }
+
assertTrue("No log messages found", result.contains("<pre class='logevent'>"));
// Shutdown cleanly.
[3/3] git commit: Merge branch '1.6.1-SNAPSHOT'
Posted by bu...@apache.org.
Merge branch '1.6.1-SNAPSHOT'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/89f9c97b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/89f9c97b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/89f9c97b
Branch: refs/heads/master
Commit: 89f9c97bec60ba9aeed09f75ece60397b03d584b
Parents: e1862d3 e8fab2f
Author: Sean Busbey <bu...@cloudera.com>
Authored: Tue May 13 08:58:37 2014 -0500
Committer: Sean Busbey <bu...@cloudera.com>
Committed: Tue May 13 08:58:37 2014 -0500
----------------------------------------------------------------------
.../test/functional/MonitorLoggingIT.java | 26 +++++++++++++++-----
1 file changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: ACCUMULO-2798 make MonitorLoggingIT retry.
Posted by bu...@apache.org.
ACCUMULO-2798 make MonitorLoggingIT retry.
Sets a timeout so it doesn't retry forever.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e8fab2f8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e8fab2f8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e8fab2f8
Branch: refs/heads/master
Commit: e8fab2f89ca8bfaedb13a699e5b3f73551e14bbf
Parents: a73cf85
Author: Sean Busbey <bu...@cloudera.com>
Authored: Mon May 12 20:05:01 2014 -0500
Committer: Sean Busbey <bu...@cloudera.com>
Committed: Tue May 13 08:48:53 2014 -0500
----------------------------------------------------------------------
.../test/functional/MonitorLoggingIT.java | 26 +++++++++++++++-----
1 file changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e8fab2f8/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 2dadafe..c4a2e3d 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
@@ -50,7 +50,12 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
}
private static final int NUM_LOCATION_PASSES = 5;
- private static final long LOCATION_DELAY = 5000L;
+ private static final int LOCATION_DELAY = 5000;
+
+ @Override
+ protected int defaultTimeoutSeconds() {
+ return (NUM_LOCATION_PASSES + 2) * LOCATION_DELAY;
+ }
@Test
public void logToMonitor() throws Exception {
@@ -82,12 +87,21 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
} catch (Exception e) {
// expected, the iterator was bad
}
- Thread.sleep(5000L); // extra precaution to ensure monitor has opportunity to log
- // Verify messages were received at the monitor.
- URL url = new URL("http://" + monitorLocation + "/log");
- log.debug("Fetching web page " + url);
- String result = FunctionalTestUtils.readAll(url.openStream());
+ String result = "";
+ while(true) {
+ Thread.sleep(LOCATION_DELAY); // extra precaution to ensure monitor has opportunity to log
+
+ // Verify messages were received at the monitor.
+ URL url = new URL("http://" + monitorLocation + "/log");
+ log.debug("Fetching web page " + url);
+ result = FunctionalTestUtils.readAll(url.openStream());
+ if (result.contains("<pre class='logevent'>")) {
+ break;
+ }
+ log.debug("No messages found, waiting a little longer...");
+ }
+
assertTrue("No log messages found", result.contains("<pre class='logevent'>"));
// Shutdown cleanly.