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

broustant pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-sandbox.git


The following commit(s) were added to refs/heads/main by this push:
     new 6eb50a4  Fix encryption test util flappiness. (#126)
6eb50a4 is described below

commit 6eb50a4295dab3ac358211244869e78b01317940
Author: Bruno Roustant <[email protected]>
AuthorDate: Wed Oct 8 16:36:58 2025 +0200

    Fix encryption test util flappiness. (#126)
---
 .../test/java/org/apache/solr/encryption/EncryptionTestUtil.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/encryption/src/test/java/org/apache/solr/encryption/EncryptionTestUtil.java 
b/encryption/src/test/java/org/apache/solr/encryption/EncryptionTestUtil.java
index 2aab0fa..7a67a58 100644
--- 
a/encryption/src/test/java/org/apache/solr/encryption/EncryptionTestUtil.java
+++ 
b/encryption/src/test/java/org/apache/solr/encryption/EncryptionTestUtil.java
@@ -41,6 +41,7 @@ import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.Consumer;
 
 import static org.apache.lucene.tests.util.LuceneTestCase.random;
@@ -223,9 +224,10 @@ public class EncryptionTestUtil {
   }
 
   public void waitUntilEncryptionIsComplete(String keyId) throws 
InterruptedException {
+    AtomicBoolean success = new AtomicBoolean();
     RetryUtil.retryUntil("Timeout waiting for encryption completion",
-                         50,
-                         100,
+                         20,
+                         1000,
                          TimeUnit.MILLISECONDS,
                          () -> {
                            EncryptionStatus encryptionStatus;
@@ -234,9 +236,10 @@ public class EncryptionTestUtil {
                            } catch (Exception e) {
                              throw new RuntimeException(e);
                            }
-                           assertTrue(encryptionStatus.success);
+                           success.set(encryptionStatus.success);
                            return encryptionStatus.complete;
                          });
+    assertTrue(success.get());
   }
 
   /**

Reply via email to