]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7908 add some assertions to ClusterTest
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 4 Aug 2016 08:50:51 +0000 (10:50 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 4 Aug 2016 08:50:51 +0000 (10:50 +0200)
it/it-tests/src/test/java/it/serverSystem/ClusterTest.java

index 2344cc663894a3ab87757fcd7f35a9bd8d3db87e..8a792854e7e4eba7287ab0eadd69d0783ef4b2a9 100644 (file)
@@ -79,7 +79,7 @@ public class ClusterTest {
   }
 
   @Test
-  public void start_cluster_of_elasticsearch_and_web_nodes() {
+  public void start_cluster_of_elasticsearch_and_web_nodes() throws IOException {
     Orchestrator elasticsearch = null;
     Orchestrator web = null;
 
@@ -93,6 +93,7 @@ public class ClusterTest {
         .build();
       elasticsearch.start();
       assertThat(esWatcher.port).isGreaterThan(0);
+      assertThat(FileUtils.readFileToString(elasticsearch.getServer().getLogs())).doesNotContain("Process[web]");
 
       web = Orchestrator.builderEnv()
         .setServerProperty("sonar.cluster.enabled", "true")
@@ -107,6 +108,7 @@ public class ClusterTest {
         .build();
       web.start();
 
+      assertThat(FileUtils.readFileToString(elasticsearch.getServer().getLogs())).doesNotContain("Process[es]");
       // call a web service that requires Elasticsearch
       Issues.SearchWsResponse wsResponse = ItUtils.newWsClient(web).issues().search(new org.sonarqube.ws.client.issue.SearchWsRequest());
       assertThat(wsResponse.getIssuesCount()).isEqualTo(0);