]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7565 add IT for new status RESTARTING
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 25 Apr 2016 14:09:18 +0000 (16:09 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 26 Apr 2016 10:28:43 +0000 (12:28 +0200)
it/it-tests/src/test/java/it/serverSystem/RestartTest.java

index c5d35cb1fd416644a4b2d0e1c2e0bfee2d2129ef..506bd86d1228b13bbab8aea2a1f37adfa045b97d 100644 (file)
@@ -30,6 +30,8 @@ import org.junit.rules.DisableOnDebug;
 import org.junit.rules.ExpectedException;
 import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.WsResponse;
 import util.QaOnly;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -75,6 +77,8 @@ public class RestartTest {
       }
 
       newAdminWsClient(orchestrator).system().restart();
+      WsResponse wsResponse = newAdminWsClient(orchestrator).wsConnector().call(new GetRequest("/api/system/status")).failIfNotSuccessful();
+      assertThat(wsResponse.content()).contains("RESTARTING");
 
       // we just wait five seconds, for a lack of a better approach to waiting for the restart process to start in SQ
       Thread.sleep(5000);