accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1461780 - in /accumulo/branches/1.5/test/src: main/resources/ main/resources/log4j.properties test/java/org/apache/accumulo/test/ShellServerTest.java
Date Wed, 27 Mar 2013 18:45:40 GMT
Author: ecn
Date: Wed Mar 27 18:45:40 2013
New Revision: 1461780

URL: http://svn.apache.org/r1461780
Log:
ACCUMULO-1215 wait for both tservers to come up

Added:
    accumulo/branches/1.5/test/src/main/resources/
    accumulo/branches/1.5/test/src/main/resources/log4j.properties   (with props)
Modified:
    accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java

Added: accumulo/branches/1.5/test/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/main/resources/log4j.properties?rev=1461780&view=auto
==============================================================================
--- accumulo/branches/1.5/test/src/main/resources/log4j.properties (added)
+++ accumulo/branches/1.5/test/src/main/resources/log4j.properties Wed Mar 27 18:45:40 2013
@@ -0,0 +1,3 @@
+log4j.rootLogger=INFO,A1
+log4j.logger.org.apache.accumulo.core.util.shell.Shell.audit=WARN,A1
+log4j.appender.A1=org.apache.log4j.ConsoleAppender

Propchange: accumulo/branches/1.5/test/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java?rev=1461780&r1=1461779&r2=1461780&view=diff
==============================================================================
--- accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
(original)
+++ accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
Wed Mar 27 18:45:40 2013
@@ -13,6 +13,7 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.lang.reflect.Constructor;
+import java.util.Arrays;
 import java.util.Map.Entry;
 
 import jline.ConsoleReader;
@@ -30,6 +31,7 @@ import org.apache.accumulo.core.file.Fil
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.util.shell.Shell;
 import org.apache.accumulo.server.trace.TraceServer;
+import org.apache.commons.logging.impl.Log4JCategoryLog;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -579,7 +581,14 @@ public class ShellServerTest {
   
   @Test(timeout = 30000)
   public void ping() throws Exception {
-    exec("ping", true, "OK", true);
+    for (int i = 0; i < 10; i++) {
+      exec("ping", true, "OK", true);
+      // wait for both tservers to start up
+      if (output.get().split("\n").length == 3)
+        break;
+      UtilWaitThread.sleep(1000);
+      
+    }
     assertEquals(3, output.get().split("\n").length);
   }
   



Mime
View raw message