jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From am...@apache.org
Subject svn commit: r1772597 - /jackrabbit/trunk/jackrabbit-data/src/test/java/org/apache/jackrabbit/core/data/TestLocalCache.java
Date Mon, 05 Dec 2016 04:49:31 GMT
Author: amitj
Date: Mon Dec  5 04:49:31 2016
New Revision: 1772597

URL: http://svn.apache.org/viewvc?rev=1772597&view=rev
Log:
JCR-4073: jackrabbit-data: occasional test failures in TestLocalCache.testAutoPurge

Patch from Wonsan Ko
* Wait until purge job finishes
* reduce sleep to 500 ms

Modified:
    jackrabbit/trunk/jackrabbit-data/src/test/java/org/apache/jackrabbit/core/data/TestLocalCache.java

Modified: jackrabbit/trunk/jackrabbit-data/src/test/java/org/apache/jackrabbit/core/data/TestLocalCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-data/src/test/java/org/apache/jackrabbit/core/data/TestLocalCache.java?rev=1772597&r1=1772596&r2=1772597&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-data/src/test/java/org/apache/jackrabbit/core/data/TestLocalCache.java
(original)
+++ jackrabbit/trunk/jackrabbit-data/src/test/java/org/apache/jackrabbit/core/data/TestLocalCache.java
Mon Dec  5 04:49:31 2016
@@ -191,7 +191,9 @@ public class TestLocalCache extends Test
             byteMap.put("a4", data);
             // storing a4 should purge cache
             cache.store("a4", new ByteArrayInputStream(byteMap.get("a4")));
-            Thread.sleep(1000);
+            do {
+                Thread.sleep(500);
+            } while (cache.isInPurgeMode());
 
             result = cache.getIfStored("a1");
             assertNull("a1 should be null", result);



Mime
View raw message