aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-03-16 23:01:11 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-03-25 09:58:44 +0100
commit6bc55b17ebd87802cb9b55d5b6625e1a935f3909 (patch)
tree0a50457cc294c211ad7a3ee081dabb93e4231286 /it
parent4250bb53f050b5a7f86b211ec2b34f85f7cc3ddc (diff)
downloadsonarqube-6bc55b17ebd87802cb9b55d5b6625e1a935f3909.tar.gz
sonarqube-6bc55b17ebd87802cb9b55d5b6625e1a935f3909.zip
SONAR-7436 Monitoring of CE process in system WS and console
Diffstat (limited to 'it')
-rw-r--r--it/it-tests/src/test/java/it/serverSystem/ServerSystemTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/it/it-tests/src/test/java/it/serverSystem/ServerSystemTest.java b/it/it-tests/src/test/java/it/serverSystem/ServerSystemTest.java
index 64c72d3faec..51192aac4bc 100644
--- a/it/it-tests/src/test/java/it/serverSystem/ServerSystemTest.java
+++ b/it/it-tests/src/test/java/it/serverSystem/ServerSystemTest.java
@@ -40,12 +40,15 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.sonar.wsclient.services.Server;
import org.sonar.wsclient.services.ServerQuery;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.WsResponse;
import util.ItUtils;
import util.QaOnly;
import util.selenium.SeleneseTest;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
+import static util.ItUtils.newAdminWsClient;
@Category(QaOnly.class)
public class ServerSystemTest {
@@ -90,6 +93,22 @@ public class ServerSystemTest {
}
/**
+ * SONAR-7436
+ */
+ @Test
+ public void monitor_compute_engine_and_elasticsearch_processes() throws Exception {
+ WsResponse response = newAdminWsClient(orchestrator).wsConnector().call(
+ new GetRequest("api/system/info"));
+ assertThat(response.code()).isEqualTo(200);
+
+ assertThat(response.content()).containsSequence("\"Compute Engine Database\":", "\"Pool Active Connections\"");
+ assertThat(response.content()).containsSequence("\"Compute Engine State\":", "\"Heap Used\"");
+ assertThat(response.content()).containsSequence("\"Compute Engine Tasks\":", "\"Pending\"", "\"In Progress\"");
+
+ assertThat(response.content()).containsSequence("\"Elasticsearch\":", "\"State\":\"GREEN\"");
+ }
+
+ /**
* See http://jira.codehaus.org/browse/SONAR-2727
*/
@Test