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

github-merge-queue[bot] pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new c7304ace6e [Test][Connector-V2] Widen PayPalClientTest's loopback HTTP 
wait budget for slower CI runners (#12370)
c7304ace6e is described below

commit c7304ace6e18d350314e92480df1fd3c0962f1f2
Author: Daniel <[email protected]>
AuthorDate: Thu Sep 17 11:53:46 2026 +0000

    [Test][Connector-V2] Widen PayPalClientTest's loopback HTTP wait budget for 
slower CI runners (#12370)
    
    Co-authored-by: DanielLeens <[email protected]>
    Co-authored-by: Claude Sonnet 5 <[email protected]>
---
 .../seatunnel/paypal/source/PayPalClientTest.java     | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git 
a/seatunnel-connectors-v2/connector-http/connector-http-paypal/src/test/java/org/apache/seatunnel/connectors/seatunnel/paypal/source/PayPalClientTest.java
 
b/seatunnel-connectors-v2/connector-http/connector-http-paypal/src/test/java/org/apache/seatunnel/connectors/seatunnel/paypal/source/PayPalClientTest.java
index b72899d907..0a59c9e486 100644
--- 
a/seatunnel-connectors-v2/connector-http/connector-http-paypal/src/test/java/org/apache/seatunnel/connectors/seatunnel/paypal/source/PayPalClientTest.java
+++ 
b/seatunnel-connectors-v2/connector-http/connector-http-paypal/src/test/java/org/apache/seatunnel/connectors/seatunnel/paypal/source/PayPalClientTest.java
@@ -107,6 +107,15 @@ class PayPalClientTest {
         assertThrows(IllegalStateException.class, reader::open);
     }
 
+    /**
+     * Upper bound for waits on the loopback HTTP round-trip (the embedded 
{@link HttpServer} and
+     * this test's client share the JVM, but the request still crosses the OS 
network stack).
+     * Windows CI runners have shown this round-trip occasionally exceeding 
several seconds under
+     * load, so this is generous rather than tuned to the fast common case; a 
genuine hang in the
+     * client's close/cancel wiring still fails the test, just with a larger 
bound.
+     */
+    private static final long NETWORK_WAIT_SECONDS = 15;
+
     private HttpServer server;
     private ExecutorService executor;
     private final Queue<Reply> replies = new ConcurrentLinkedQueue<>();
@@ -383,9 +392,9 @@ class PayPalClientTest {
         PayPalClient transport = client();
         Future<?> result =
                 executor.submit(() -> assertThrows(Exception.class, () -> 
transport.page(1)));
-        assertTrue(arrived.await(3, TimeUnit.SECONDS));
+        assertTrue(arrived.await(NETWORK_WAIT_SECONDS, TimeUnit.SECONDS));
         transport.close();
-        result.get(3, TimeUnit.SECONDS);
+        result.get(NETWORK_WAIT_SECONDS, TimeUnit.SECONDS);
     }
 
     @Test
@@ -404,14 +413,14 @@ class PayPalClientTest {
                             }
                         });
         worker.start();
-        assertTrue(arrived.await(3, TimeUnit.SECONDS));
-        long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(3);
+        assertTrue(arrived.await(NETWORK_WAIT_SECONDS, TimeUnit.SECONDS));
+        long deadline = System.nanoTime() + 
TimeUnit.SECONDS.toNanos(NETWORK_WAIT_SECONDS);
         while (worker.getState() != Thread.State.TIMED_WAITING && 
System.nanoTime() < deadline) {
             Thread.sleep(10);
         }
         assertEquals(Thread.State.TIMED_WAITING, worker.getState());
         transport.close();
-        assertTrue(complete.await(3, TimeUnit.SECONDS));
+        assertTrue(complete.await(NETWORK_WAIT_SECONDS, TimeUnit.SECONDS));
         worker.join();
         assertEquals(1, requests.size());
     }

Reply via email to