You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2012/08/10 00:00:05 UTC

svn commit: r1371510 - /incubator/jspwiki/trunk/tests/org/apache/wiki/HsqlDbUtils.java

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() ) 
         {