You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by da...@apache.org on 2026/10/07 12:43:14 UTC
(jackrabbit-oak) 01/01: OAK-12442: isolate conditional-path query test from built-in index counters
This is an automated email from the ASF dual-hosted git repository.
rishabhdaim pushed a commit to branch issue/OAK-12442
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit 21abe67ad2b645f7d8235a20a9d4c87416b7b956
Author: rishabhdaim <ri...@gmail.com>
AuthorDate: Wed Oct 7 18:13:00 2026 +0530
OAK-12442: isolate conditional-path query test from built-in index counters
---
.../jackrabbit/oak/plugins/index/FunctionIndexCommonTest.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/FunctionIndexCommonTest.java b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/FunctionIndexCommonTest.java
index f9088467fe..cc73f94950 100644
--- a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/FunctionIndexCommonTest.java
+++ b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/FunctionIndexCommonTest.java
@@ -1042,12 +1042,13 @@ public abstract class FunctionIndexCommonTest extends AbstractQueryTest {
"/oak:index/test1", List.of("/a")));
}
+ // Uses a test-only counter so built-in index reindex counts cannot match.
@Test
public void opFunctionConditionalPathQuery() throws Exception {
String old = System.getProperty(QueryEngineSettings.OAK_QUERY_OP_FUNCTION);
System.setProperty(QueryEngineSettings.OAK_QUERY_OP_FUNCTION, "true");
try {
- String function = "if(op([reindexCount], '>', 'lon:0'), path(), null)";
+ String function = "if(op([testReindexCount], '>', 'lon:0'), path(), null)";
IndexDefinitionBuilder idxb = indexOptions.createIndexDefinitionBuilder()
.noAsync()
.evaluatePathRestrictions()
@@ -1061,10 +1062,10 @@ public abstract class FunctionIndexCommonTest extends AbstractQueryTest {
Tree oakIndex = root.getTree("/oak:index");
Tree a = oakIndex.addChild("a");
a.setProperty("type", "disabled");
- a.setProperty("reindexCount", 2L);
+ a.setProperty("testReindexCount", 2L);
Tree b = oakIndex.addChild("b");
b.setProperty("type", "disabled");
- b.setProperty("reindexCount", 0L);
+ b.setProperty("testReindexCount", 0L);
oakIndex.addChild("c").setProperty("type", "disabled");
root.commit();
String query = "select * from [nt:base] " +