jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1371510 - /incubator/jspwiki/trunk/tests/org/apache/wiki/HsqlDbUtils.java
Date Thu, 09 Aug 2012 22:00:05 GMT
Author: juanpablo
Date: Thu Aug  9 22:00:05 2012
New Revision: 1371510

URL: http://svn.apache.org/viewvc?rev=1371510&view=rev
Log:
Poll every 0.2 seconds, up to 5 seconds, if file still exists instead of waiting the whole
5 secs, which improves a lot the timing of tests interacting with hsqldb.

No version bump as there's no functionality change.

Modified:
    incubator/jspwiki/trunk/tests/org/apache/wiki/HsqlDbUtils.java

Modified: incubator/jspwiki/trunk/tests/org/apache/wiki/HsqlDbUtils.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/org/apache/wiki/HsqlDbUtils.java?rev=1371510&r1=1371509&r2=1371510&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/org/apache/wiki/HsqlDbUtils.java (original)
+++ incubator/jspwiki/trunk/tests/org/apache/wiki/HsqlDbUtils.java Thu Aug  9 22:00:05 2012
@@ -97,7 +97,18 @@ public class HsqlDbUtils
             lock.delete();
         }
         
-        Thread.sleep( 5000L );
+        for( long l = 0; l < 50; l++ ) 
+        {
+            if( lock.exists() ) 
+            {
+                Thread.sleep( 200L );
+            }
+            else 
+            {
+                break;
+            }
+        }
+        
         
         if( lock.exists() ) 
         {



Mime
View raw message