sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1730634 - /sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/ControlListenerTest.java
Date Tue, 16 Feb 2016 06:38:55 GMT
Author: cziegeler
Date: Tue Feb 16 06:38:54 2016
New Revision: 1730634

URL: http://svn.apache.org/viewvc?rev=1730634&view=rev
Log:
Add delay to tests to give shutdown a little bit of time

Modified:
    sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/ControlListenerTest.java

Modified: sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/ControlListenerTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/ControlListenerTest.java?rev=1730634&r1=1730633&r2=1730634&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/ControlListenerTest.java
(original)
+++ sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/app/ControlListenerTest.java
Tue Feb 16 06:38:54 2016
@@ -26,10 +26,10 @@ import java.net.ServerSocket;
 import java.util.HashMap;
 import java.util.concurrent.locks.ReentrantLock;
 
-import junit.framework.TestCase;
-
 import org.apache.sling.launchpad.base.shared.SharedConstants;
 
+import junit.framework.TestCase;
+
 public class ControlListenerTest extends TestCase {
 
     private static String SLING1 = "target/sling.test/1";
@@ -247,6 +247,8 @@ public class ControlListenerTest extends
         TestCase.assertEquals(0, new ControlListener(main1, null).statusServer());
         TestCase.assertEquals(0, new ControlListener(main1, null).shutdownServer());
 
+        delay();
+
         TestCase.assertTrue(main1.stopCalled);
 
         delay();
@@ -259,6 +261,8 @@ public class ControlListenerTest extends
         TestCase.assertEquals(0, new ControlListener(main2, null).statusServer());
         TestCase.assertEquals(0, new ControlListener(main2, null).shutdownServer());
 
+        delay();
+
         TestCase.assertTrue(main2.stopCalled);
 
         delay();
@@ -283,6 +287,8 @@ public class ControlListenerTest extends
 
         TestCase.assertEquals(3, new ControlListener(main, null).shutdownServer());
 
+        delay();
+
         TestCase.assertFalse(main.stopCalled);
 
         TestCase.assertTrue(ctlFile1.exists());
@@ -298,6 +304,8 @@ public class ControlListenerTest extends
 
         TestCase.assertEquals(4, new ControlListener(main, String.valueOf(port)).shutdownServer());
 
+        delay();
+
         TestCase.assertFalse(main.stopCalled);
 
         TestCase.assertFalse(ctlFile1.exists());
@@ -320,6 +328,8 @@ public class ControlListenerTest extends
 
         TestCase.assertEquals(4, new ControlListener(main, null).shutdownServer());
 
+        delay();
+
         TestCase.assertFalse(main.stopCalled);
 
         TestCase.assertTrue(ctlFile1.exists());



Mime
View raw message