accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1459752 - /accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
Date Fri, 22 Mar 2013 13:10:44 GMT
Author: ecn
Date: Fri Mar 22 13:10:44 2013
New Revision: 1459752

URL: http://svn.apache.org/r1459752
Log:
ACCUMULO-581 added test for shell trace command

Modified:
    accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java

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=1459752&r1=1459751&r2=1459752&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
Fri Mar 22 13:10:44 2013
@@ -125,13 +125,15 @@ public class ShellServerTest {
     shell.start();
     shell.setExit(false);
     traceProcess = cluster.exec(TraceServer.class);
+    // give the tracer some time to start
+    UtilWaitThread.sleep(1000);
   }
   
   @AfterClass
   public static void tearDownAfterClass() throws Exception {
-    cluster.stop();
-    traceProcess.destroy();
-    folder.delete();
+    //cluster.stop();
+    //traceProcess.destroy();
+    //folder.delete();
   }
   
   @Test(timeout = 30000)
@@ -608,18 +610,19 @@ public class ShellServerTest {
     exec("deletetable -f t", true);
   }
   
-  //@Test(timeout = 60000)
+  @Test(timeout = 30000)
   public void trace() throws Exception {
-    exec("sleep 1", true);
     exec("trace on", true);
     exec("createtable t", true);
-    System.out.println(exec("trace off"));
-    exec("table trace");
-    System.out.println(exec("scan -np"));
-    exec("sleep 10");
-    System.out.println(exec("scan -np"));
-    UtilWaitThread.sleep(60*1000);
+    exec("insert a b c value", true);
+    exec("scan -np", true, "value", true);
     exec("deletetable -f t");
+    String trace = exec("trace off");
+    assertTrue(trace.contains("shell@"));
+    assertTrue(trace.contains("binMutations"));
+    assertTrue(trace.contains("client:update"));
+    assertTrue(trace.contains("update"));
+    assertTrue(trace.contains("DeleteTable"));
   }
   
   private int countkeys(String table) throws IOException {



Mime
View raw message