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

mkataria 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 e421f1adf6 OAK-10381: DocumentStoreIndexerIT failure resolved (#1052)
e421f1adf6 is described below

commit e421f1adf6ef459454f7a4a51484b43997c51486
Author: Mohit Kataria <mkata...@apache.org>
AuthorDate: Tue Aug 8 19:56:32 2023 +0530

    OAK-10381: DocumentStoreIndexerIT failure resolved (#1052)
---
 .../jackrabbit/oak/index/ElasticAbstractIndexCommandTest.java      | 6 +++++-
 .../jackrabbit/oak/index/LuceneAbstractIndexCommandTest.java       | 7 ++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git 
a/oak-run-elastic/src/test/java/org/apache/jackrabbit/oak/index/ElasticAbstractIndexCommandTest.java
 
b/oak-run-elastic/src/test/java/org/apache/jackrabbit/oak/index/ElasticAbstractIndexCommandTest.java
index 02a2aa0694..5d1f2aceee 100644
--- 
a/oak-run-elastic/src/test/java/org/apache/jackrabbit/oak/index/ElasticAbstractIndexCommandTest.java
+++ 
b/oak-run-elastic/src/test/java/org/apache/jackrabbit/oak/index/ElasticAbstractIndexCommandTest.java
@@ -65,7 +65,11 @@ public class ElasticAbstractIndexCommandTest extends 
AbstractIndexTestCommand {
                 "oak:QueryIndexDefinition", session);
 
         idxBuilder.build(fooIndex);
-        
fooIndex.addNode("suggestion").setProperty("suggestUpdateFrequencyMinutes", 0);
+        if (fooIndex.hasNode("suggestion")) {
+            
fooIndex.getNode("suggestion").setProperty("suggestUpdateFrequencyMinutes", 0);
+        } else {
+            
fooIndex.addNode("suggestion").setProperty("suggestUpdateFrequencyMinutes", 0);
+        }
         session.save();
         session.logout();
     }
diff --git 
a/oak-run/src/test/java/org/apache/jackrabbit/oak/index/LuceneAbstractIndexCommandTest.java
 
b/oak-run/src/test/java/org/apache/jackrabbit/oak/index/LuceneAbstractIndexCommandTest.java
index e99a51e610..c047bcc327 100644
--- 
a/oak-run/src/test/java/org/apache/jackrabbit/oak/index/LuceneAbstractIndexCommandTest.java
+++ 
b/oak-run/src/test/java/org/apache/jackrabbit/oak/index/LuceneAbstractIndexCommandTest.java
@@ -51,7 +51,12 @@ public class LuceneAbstractIndexCommandTest extends 
AbstractIndexTestCommand {
                 "oak:QueryIndexDefinition", session);
 
         idxBuilder.build(fooIndex);
-        
fooIndex.addNode("suggestion").setProperty("suggestUpdateFrequencyMinutes", 0);
+        if (fooIndex.hasNode("suggestion")) {
+            
fooIndex.getNode("suggestion").setProperty("suggestUpdateFrequencyMinutes", 0);
+        } else {
+            
fooIndex.addNode("suggestion").setProperty("suggestUpdateFrequencyMinutes", 0);
+        }
+
         session.save();
         session.logout();
     }

Reply via email to