db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1241841 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServerTest.java
Date Wed, 08 Feb 2012 10:03:08 GMT
Author: kahatlen
Date: Wed Feb  8 10:03:08 2012
New Revision: 1241841

URL: http://svn.apache.org/viewvc?rev=1241841&view=rev
Log:
DERBY-5598: DerbyNetNewServerTest fails: Num of log item should add

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServerTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServerTest.java?rev=1241841&r1=1241840&r2=1241841&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServerTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServerTest.java
Wed Feb  8 10:03:08 2012
@@ -88,7 +88,15 @@ public class DerbyNetNewServerTest exten
         assertTrue("Create log with start message", 0 < sizeAfterPing);        
         
         server.shutdown();
+
+        // DERBY-5598: The shutdown command doesn't wait until the message has
+        // been written before it returns. Give the message a little time (up
+        // to half a minute) to propagate to the log.
         int sizeAfterShutDown = bos.size();
+        for (int i = 0; i < 60 && sizeAfterShutDown == sizeAfterPing; i++) {
+            Thread.sleep(500L);
+            sizeAfterShutDown = bos.size();
+        }
         bos.close();
         bos = null;
         writer.close();



Mime
View raw message