Repository: accumulo
Updated Branches:
  refs/heads/1.6.1-SNAPSHOT 5c8ac744e -> 32840695f
  refs/heads/master e7b877360 -> 464f73675


ACCUMULO-3109 Stabilize MonitorLoggingIT some more

We only need one tserver (reduce ZK watchers to fire),
remove the timeout attribute so timeout.factor works,
and sleep before we cause the error so the tserver is
likely to have seen the updated log-fwding addr.


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

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 32840695fb2f79dcaab025d4100d5bb8066b8524
Parents: 5c8ac74
Author: Josh Elser <els...@apache.org>
Authored: Wed Sep 10 17:18:47 2014 -0700
Committer: Josh Elser <els...@apache.org>
Committed: Wed Sep 10 17:18:47 2014 -0700

----------------------------------------------------------------------
 .../apache/accumulo/test/functional/MonitorLoggingIT.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/32840695/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 b843a1d..1787898 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
@@ -39,6 +39,7 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
 
   @Override
   public void beforeClusterStart(MiniAccumuloConfigImpl cfg) throws Exception {
+    cfg.setNumTservers(1);
     File confDir = cfg.getConfDir();
     try {
       FileUtils.copyFileToDirectory(new 
File(MonitorLoggingIT.class.getResource("/conf/generic_logger.xml").toURI()), 
confDir);
@@ -56,7 +57,7 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
     return 30 + ((NUM_LOCATION_PASSES + 2) * LOCATION_DELAY_SECS);
   }
 
-  @Test(timeout = 30 + ((NUM_LOCATION_PASSES + 2) * LOCATION_DELAY_SECS * 
1000))
+  @Test
   public void logToMonitor() throws Exception {
     // Start the monitor.
     log.debug("Starting Monitor");
@@ -76,6 +77,11 @@ public class MonitorLoggingIT extends ConfigurableMacIT {
     assertNotNull("Monitor failed to start within " + (LOCATION_DELAY_SECS * 
NUM_LOCATION_PASSES) + " secs", monitorLocation);
     log.debug("Monitor running at " + monitorLocation);
 
+    // The tserver has to observe that the log-forwarding address
+    // changed in ZooKeeper. If we cause the error before the tserver
+    // updates, we'll never see the error on the monitor.
+    Thread.sleep(10000);
+
     // Attempt a scan with an invalid iterator to force a log message in the 
monitor.
     try {
       Connector c = getConnector();

Reply via email to