incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1524703 - /sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
Date Thu, 19 Sep 2013 11:54:18 GMT
Author: bdelacretaz
Date: Thu Sep 19 11:54:17 2013
New Revision: 1524703

URL: http://svn.apache.org/r1524703
Log:
SLING-3076 - refresh Session before querying, to avoid 'item does not exist anymore' error
with Oak

Modified:
    sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java

Modified: sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java?rev=1524703&r1=1524702&r2=1524703&view=diff
==============================================================================
--- sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
(original)
+++ sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
Thu Sep 19 11:54:17 2013
@@ -201,6 +201,7 @@ public class ScriptableTestsProvider imp
         for(String root : allowedRoots) {
             final String statement = "/jcr:root" + root + "/element(*, " + SLING_TEST_NODETYPE
+ ")";
             log.debug("Querying for test nodes: {}", statement);
+            session.refresh(true);
             final Query q = session.getWorkspace().getQueryManager().createQuery(statement,
Query.XPATH);
             final NodeIterator it = q.execute().getNodes();
             while(it.hasNext()) {



Mime
View raw message