You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2015/12/21 16:12:52 UTC

ambari git commit: AMBARI-14446. Ambari Server Unit Test failure on trunk (org.apache.ambari.server.bootstrap.BootStrapTest.testRun).(vbrodetskyi)

Repository: ambari
Updated Branches:
  refs/heads/trunk 1ad5db194 -> d4adc1a9f


AMBARI-14446. Ambari Server Unit Test failure on trunk (org.apache.ambari.server.bootstrap.BootStrapTest.testRun).(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: d4adc1a9fb2c28ca516f3c9911540db2eb5f2d78
Parents: 1ad5db1
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Mon Dec 21 17:12:23 2015 +0200
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Mon Dec 21 17:12:23 2015 +0200

----------------------------------------------------------------------
 .../ambari/server/bootstrap/BootStrapTest.java    | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4adc1a9/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
index 5fbad18..e4a385f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
@@ -18,15 +18,8 @@
 
 package org.apache.ambari.server.bootstrap;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.bootstrap.BootStrapStatus.BSStat;
 import org.apache.ambari.server.configuration.Configuration;
@@ -38,6 +31,11 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
 
 /**
  * Test BootStrap Implementation.
@@ -97,11 +95,13 @@ public class BootStrapTest extends TestCase {
     BootStrapStatus status = impl.getStatus(response.getRequestId());
     LOG.info("Status " + status.getStatus());
     int num = 0;
-    while ((status.getStatus() == BSStat.RUNNING) && (num < 500)) {
+    while ((status.getStatus() == BSStat.RUNNING) && (num < 50)) {
       status = impl.getStatus(response.getRequestId());
-      Thread.sleep(100);
+      Thread.sleep(1000);
       num++;
     }
+    // to give a time for bootstrap thread to finish
+    Thread.sleep(5000);
     LOG.info("Status: log " + status.getLog() + " status=" + status.getStatus()
     );
     /* Note its an echo command so it should echo host1,host2 */