]> source.dussan.org Git - sonarqube.git/commitdiff
Fix HttpDownloaderTest on Windows
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 13 Oct 2011 09:22:23 +0000 (11:22 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 13 Oct 2011 09:22:23 +0000 (11:22 +0200)
sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java

index d0fcc390deaa96ad156f20a12a32efce950bf1dd..5c2ef1c3eb38b0c04b63ccd405e76dd862bb09cd 100644 (file)
@@ -24,7 +24,6 @@ import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.SystemUtils;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.mortbay.jetty.testing.ServletTester;
 import org.sonar.api.config.Settings;
@@ -155,8 +154,10 @@ public class HttpDownloaderTest {
 
        We'll have to check if Jetty 7 resolves this toString() issue.
     */
-    Thread.sleep(1000);
-    tester.stop();
+    if (tester != null) {
+      Thread.sleep(1000);
+      tester.stop();
+    }
   }
 
   @Test