From: Simon Brandhof Date: Mon, 8 Dec 2014 11:08:44 +0000 (+0100) Subject: Remove test in SearchServerTest because of too many false-positives on slow windows... X-Git-Tag: 5.0-RC1~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2ad3462a1c03a0eef542c762dd008b7188bf9f9c;p=sonarqube.git Remove test in SearchServerTest because of too many false-positives on slow windows environment --- diff --git a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java index 122ff0431d0..969137e97ab 100644 --- a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java +++ b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java @@ -88,47 +88,6 @@ public class SearchServerTest { } } - @Test - public void slave_success_replication() throws Exception { - Props props = new Props(new Properties()); - props.set(ProcessConstants.SEARCH_PORT, String.valueOf(port)); - props.set(ProcessConstants.CLUSTER_ACTIVATE, "true"); - props.set(ProcessConstants.CLUSTER_MASTER, "true"); - props.set(ProcessConstants.CLUSTER_NODE_NAME, "MASTER"); - props.set(ProcessConstants.CLUSTER_NAME, CLUSTER_NAME); - props.set(ProcessConstants.PATH_HOME, temp.newFolder().getAbsolutePath()); - searchServer = new SearchServer(props); - assertThat(searchServer).isNotNull(); - - searchServer.start(); - assertThat(searchServer.isReady()).isTrue(); - - client = getSearchClient(); - client.admin().indices().prepareCreate("test").get(); - - // start a slave - props = new Props(new Properties()); - props.set(ProcessConstants.CLUSTER_ACTIVATE, "true"); - props.set(ProcessConstants.CLUSTER_MASTER_HOST, "localhost:" + port); - props.set(ProcessConstants.CLUSTER_NAME, CLUSTER_NAME); - props.set(ProcessConstants.CLUSTER_NODE_NAME, "SLAVE"); - props.set(ProcessConstants.SEARCH_PORT, String.valueOf(NetworkUtils.freePort())); - props.set(ProcessConstants.PATH_HOME, temp.newFolder().getAbsolutePath()); - SearchServer slaveServer = new SearchServer(props); - assertThat(slaveServer).isNotNull(); - - slaveServer.start(); - assertThat(slaveServer.isReady()).isTrue(); - - assertThat(client.admin().cluster().prepareClusterStats().get() - .getNodesStats().getCounts().getTotal()).isEqualTo(2); - - searchServer.stop(); - slaveServer.stop(); - searchServer.awaitStop(); - slaveServer.awaitStop(); - } - private Client getSearchClient() { Settings settings = ImmutableSettings.settingsBuilder() .put("cluster.name", CLUSTER_NAME).build();