stabilize BuildCubeWithStream

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

Branch: refs/heads/master-hbase0.98
Commit: f36b1341b7905e68b99afc77c8009ba156c0bca4
Parents: 47b7c80
Author: shaofengshi <[email protected]>
Authored: Sun Mar 12 15:15:13 2017 +0800
Committer: shaofengshi <[email protected]>
Committed: Sun Mar 12 15:15:13 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/provision/BuildCubeWithStream.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f36b1341/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithStream.java
----------------------------------------------------------------------
diff --git 
a/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithStream.java 
b/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithStream.java
index c5341d6..a527839 100644
--- a/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithStream.java
+++ b/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithStream.java
@@ -183,7 +183,7 @@ public class BuildCubeWithStream {
                     try {
                         generateStreamData(dateStart, dateEnd, 
rand.nextInt(100));
                         dateStart = dateEnd;
-                        sleep(rand.nextInt(rand.nextInt(50)) * 1000); // wait 
random time
+                        sleep(rand.nextInt(rand.nextInt(30)) * 1000); // wait 
random time
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -206,6 +206,8 @@ public class BuildCubeWithStream {
                 if (generateDataDone == false) {
                     throw new IllegalStateException("Timeout when wait all 
messages be sent to Kafka"); // ensure all messages have been flushed.
                 }
+            } else {
+                Thread.sleep(30 * 1000); // wait for new messages
             }
 
             FutureTask futureTask = new FutureTask(new 
Callable<ExecutableState>() {
@@ -290,8 +292,8 @@ public class BuildCubeWithStream {
 
     protected void deployEnv() throws IOException {
         DeployUtil.overrideJobJarLocations();
-        //        DeployUtil.initCliWorkDir();
-        //        DeployUtil.deployMetadata();
+        //                DeployUtil.initCliWorkDir();
+        //                DeployUtil.deployMetadata();
     }
 
     public static void beforeClass() throws Exception {

Reply via email to