From: Simon Brandhof Date: Sun, 30 Nov 2014 19:21:12 +0000 (+0100) Subject: Minor improvement in ServerTester X-Git-Tag: 5.0-RC1~144 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=089ae2d9ab035c0634c030f57f9ceff71f9f5b74;p=sonarqube.git Minor improvement in ServerTester --- diff --git a/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java b/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java index 779b9f94382..8514dcfa3ce 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java @@ -121,11 +121,11 @@ public class ServerTester extends ExternalResource { try { if (platform != null) { platform.doStop(); + platform = null; } } catch (Exception e) { LOG.error("Fail to stop web server", e); } - platform = null; FileUtils.deleteQuietly(homeDir); } @@ -194,7 +194,7 @@ public class ServerTester extends ExternalResource { } private void checkStarted() { - if (!platform.isStarted()) { + if (platform == null || !platform.isStarted()) { throw new IllegalStateException("Not started"); } }