You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "DanielLeens (via GitHub)" <gi...@apache.org> on 2026/09/17 09:05:02 UTC
[PR] [Test][Connector-V2] Widen PayPalClientTest's loopback HTTP wait budget for slower CI runners [seatunnel]
DanielLeens opened a new pull request, #12370:
URL: https://github.com/apache/seatunnel/pull/12370
## Summary
`connector-http-paypal` (merged 2026-09-15 via #12282) is brand new, and its unit-test job has already failed once on `dev`'s own `windows-latest` `Run / unit-test` job (run `35063682504`, 2026-09-16), banning most of the reactor from that build:
```
[ERROR] Tests run: 23, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.951 s <<< FAILURE! - in org.apache.seatunnel.connectors.seatunnel.paypal.source.PayPalClientTest
[ERROR] closeWakesRetryWait Time elapsed: 3.02 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
at org.apache.seatunnel.connectors.seatunnel.paypal.source.PayPalClientTest.closeWakesRetryWait(PayPalClientTest.java:407)
```
The same windows-latest job on the runs immediately before and after (`34995029902`, `35193601793`) passed, so this is intermittent, not a deterministic bug.
## Root cause
`PayPalClientTest` spins up a real `com.sun.net.httpserver.HttpServer` bound to `127.0.0.1` and drives `PayPalClient` against it over a genuine loopback HTTP connection (not an in-memory mock). `closeWakesRetryWait` (and the structurally identical `closeAbortsActiveBody`) starts a worker thread that calls `PayPalClient#page`, then does `assertTrue(arrived.await(3, TimeUnit.SECONDS))` to wait for that first HTTP round-trip (`page` → `authenticate` → the embedded server's handler counting down `arrived`) to land before proceeding.
Three seconds is tight for a loopback HTTP round-trip on a `windows-latest` GitHub Actions runner: these runners are shared, frequently CPU/IO-throttled, and the JDK's built-in `HttpServer` plus Windows' TCP loopback stack have both been observed elsewhere to add multi-second jitter under load (matching this repo's own prior Windows-only Hazelcast startup flake). Nothing in `PayPalClient` or the test's own retry/close wiring is broken — the round-trip itself, not the logic being tested, occasionally exceeds the fixed 3s budget.
## Fix (test-only)
Introduced a single named constant, `NETWORK_WAIT_SECONDS = 15`, and used it for every wait in this file that depends on that loopback HTTP round-trip actually completing (`arrived.await`, the `Thread.State.TIMED_WAITING` poll deadline, `complete.await`, and the post-abort `Future#get`) in both `closeAbortsActiveBody` and `closeWakesRetryWait`. Left `deadlineAbortsStalledBodyAndRetryBudgetTerminates`'s `< 3000` assertion untouched — that one asserts the client's *own* configured `request_timeout_ms=150` deadline fires promptly, which is the behavior under test, not an artifact of the test's own network wait budget.
No assertion, retry count, or client behavior changed — only how long the test is willing to wait for a real network operation before deciding it hung.
## Files
- `seatunnel-connectors-v2/connector-http/connector-http-paypal/src/test/java/org/apache/seatunnel/connectors/seatunnel/paypal/source/PayPalClientTest.java`
## Test plan
Test-timing-only change; no production code touched. Verified by this PR's GitHub CI (`Run / unit-test` on all four OS/JDK legs, especially `windows-latest`), per this initiative's no-local-build policy.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Test][Connector-V2] Widen PayPalClientTest's loopback HTTP wait budget for slower CI runners [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo merged PR #12370:
URL: https://github.com/apache/seatunnel/pull/12370
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org