This is an automated email from the ASF dual-hosted git repository.

fortino pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 42cfa30f8b OAK-11736 fix failure for 
IndexQueryCommonTest.repSimilarAsNativeQuery (#2305)
42cfa30f8b is described below

commit 42cfa30f8b623a5c3aa441ef268608b714626945
Author: Fabrizio Fortino <[email protected]>
AuthorDate: Fri May 23 11:12:41 2025 +0200

    OAK-11736 fix failure for IndexQueryCommonTest.repSimilarAsNativeQuery 
(#2305)
    
    * OAK-11736 fix failure for IndexQueryCommonTest.repSimilarAsNativeQuery
    
    * OAK-11736 revert changes in ElasticRequestHandler
    
    * OAK-11736 improved test
    
    * OAK-11736 re-enable test
---
 .../apache/jackrabbit/oak/plugins/index/IndexQueryCommonTest.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexQueryCommonTest.java
 
b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexQueryCommonTest.java
index a71e5bae58..0063dd8c8c 100644
--- 
a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexQueryCommonTest.java
+++ 
b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexQueryCommonTest.java
@@ -394,7 +394,6 @@ public abstract class IndexQueryCommonTest extends 
AbstractQueryTest {
     }
 
     @Test
-    @Ignore("OAK-11736")
     public void repSimilarAsNativeQuery() throws Exception {
         String nativeQueryString = "select [jcr:path] from [nt:base] where " +
                 "native('lucene', 
'mlt?stream.body=/test/a&mlt.fl=:path&mlt.mindf=0&mlt.mintf=0')";
@@ -404,12 +403,14 @@ public abstract class IndexQueryCommonTest extends 
AbstractQueryTest {
         test.addChild("c").setProperty("text", "He said Hi.");
         root.commit();
         assertEventually(() -> {
-            Iterator<String> result = executeQuery(nativeQueryString, 
Query.JCR_SQL2).iterator();
+            Iterator<String> result = executeQuery(nativeQueryString, 
Query.JCR_SQL2, false, true).iterator();
             assertTrue(result.hasNext());
             assertEquals("/test/a", result.next());
             assertTrue(result.hasNext());
             assertEquals("/test/b", result.next());
-            assertFalse(result.hasNext());
+            while (result.hasNext()) {
+                assertNotEquals("/test/c", result.next());
+            }
         });
         assertNotEquals(0, logCustomizer.getLogs().size());
         assertTrue("native query WARN message is not present, message in 
Logger is "

Reply via email to