jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r698946 - /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/IndexingQueueTest.java
Date Thu, 25 Sep 2008 12:33:29 GMT
Author: mreutegg
Date: Thu Sep 25 05:33:28 2008
New Revision: 698946

URL: http://svn.apache.org/viewvc?rev=698946&view=rev
Log:
JCR-1764: Occasional IndexingQueueTest failures

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/IndexingQueueTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/IndexingQueueTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/IndexingQueueTest.java?rev=698946&r1=698945&r2=698946&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/IndexingQueueTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/IndexingQueueTest.java
Thu Sep 25 05:33:28 2008
@@ -60,8 +60,10 @@
         NodeIterator nodes = q.execute().getNodes();
         assertFalse(nodes.hasNext());
 
-        while (queue.getNumPendingDocuments() > 0) {
-            Thread.sleep(50);
+        synchronized (index.getIndex()) {
+            while (queue.getNumPendingDocuments() > 0) {
+                index.getIndex().wait(50);
+            }
         }
 
         q = qm.createQuery(testPath + "/*[jcr:contains(., 'fox')]", Query.XPATH);



Mime
View raw message