From 2ad3462a1c03a0eef542c762dd008b7188bf9f9c Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 8 Dec 2014 12:08:44 +0100 Subject: [PATCH] Remove test in SearchServerTest because of too many false-positives on slow windows environment --- .../org/sonar/search/SearchServerTest.java | 41 ------------------- 1 file changed, 41 deletions(-) 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(); -- 2.39.5