From 6962446f69eab08e83f120b98a315b1aef6c11ca Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 15 Dec 2014 21:59:49 +0100 Subject: Improve SearchServerTest to prepare upgrade to ES 1.4 --- .../src/test/java/org/sonar/search/SearchServerTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/sonar-search/src') 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 f2be9704667..8a9823eccc6 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 @@ -40,6 +40,7 @@ import org.sonar.process.Props; import java.util.Properties; import static org.fest.assertions.Assertions.assertThat; +import static org.fest.assertions.Fail.fail; public class SearchServerTest { @@ -84,9 +85,10 @@ public class SearchServerTest { searchServer.awaitStop(); searchServer = null; try { - assertThat(client.admin().cluster().prepareClusterStats().get().getStatus()).isNotEqualTo(ClusterHealthStatus.GREEN); + client.admin().cluster().prepareClusterStats().get(); + fail(); } catch (NoNodeAvailableException exception) { - assertThat(exception.getMessage()).isEqualTo("No node available"); + // ok } } -- cgit v1.2.3