From 089ae2d9ab035c0634c030f57f9ceff71f9f5b74 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Sun, 30 Nov 2014 20:21:12 +0100 Subject: [PATCH] Minor improvement in ServerTester --- .../src/test/java/org/sonar/server/tester/ServerTester.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); } } -- 2.39.5