From 8f2951628d59bc8e46b720373258ae932980c8ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Mon, 25 Apr 2016 16:09:18 +0200 Subject: [PATCH] SONAR-7565 add IT for new status RESTARTING --- it/it-tests/src/test/java/it/serverSystem/RestartTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/it/it-tests/src/test/java/it/serverSystem/RestartTest.java b/it/it-tests/src/test/java/it/serverSystem/RestartTest.java index c5d35cb1fd4..506bd86d122 100644 --- a/it/it-tests/src/test/java/it/serverSystem/RestartTest.java +++ b/it/it-tests/src/test/java/it/serverSystem/RestartTest.java @@ -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); -- 2.39.5