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

Cole-Greer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new d6c826d861 Stabilize the flaky shouldWaitForAllResultsToArrive test 
(#3490)
d6c826d861 is described below

commit d6c826d861ade298601cda61e94577375f35de27
Author: Oleksandr Porunov <[email protected]>
AuthorDate: Tue Jun 30 23:51:39 2026 +0100

    Stabilize the flaky shouldWaitForAllResultsToArrive test (#3490)
    
    shouldWaitForAllResultsToArrive asserted that its polling loop ran at least
    once (checked > 0). With HTTP streaming over a fast loopback, all nine 
results
    can already be available on the first allItemsAvailable() check, so the loop
    body never runs and the assertion fails intermittently. Drop that
    timing-dependent assertion; the test now only asserts that all results
    ultimately arrive.
    
    Signed-off-by: Oleksandr Porunov <[email protected]>
    Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
 .../apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 63c334d25a..83118a179a 100644
--- 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++ 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -645,15 +645,15 @@ public class GremlinDriverIntegrateTest extends 
AbstractGremlinServerIntegration
         try {
             final Client client = cluster.connect();
 
-            final AtomicInteger checked = new AtomicInteger(0);
             final ResultSet results = 
client.submit("g.inject(1,2,3,4,5,6,7,8,9)");
+            // depending on timing every result may already be available on 
the first check (in particular with HTTP
+            // streaming over a fast loopback), so do not assert that the 
polling loop runs - only that all nine
+            // results ultimately arrive and the available count never exceeds 
the total while streaming
             while (!results.allItemsAvailable()) {
                 assertTrue(results.getAvailableItemCount() < 10);
-                checked.incrementAndGet();
                 Thread.sleep(100);
             }
 
-            assertTrue(checked.get() > 0);
             assertEquals(9, results.getAvailableItemCount());
         } finally {
             cluster.close();

Reply via email to