RFR: 8314136: Test java/net/httpclient/CancelRequestTest.java failed: WARNING: tracker for HttpClientImpl(42) has outstanding operations
Daniel Fuchs
dfuchs at openjdk.org
Fri Aug 11 13:43:29 UTC 2023
Please find here a patch for a very rare intermittent failure observed in CancelRequestTest.
The fact that the number of pending requests hasn't been decremented leads me to think that completable future returned by sendAsync (called from send) hasn't been fully completed. That is, the dependent actions registered by sendAsync have not been run within the timeout waiting for the number of pending requests to reach 0.
The fix is to call cf.get() again after calling cf.cancel(), and increase the timeout waiting for cleanup in testPostInterrupt.
client.close() is also called at the end of each test method to reclaim resources earlier
-------------
Commit messages:
- 8314136
Changes: https://git.openjdk.org/jdk/pull/15249/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15249&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8314136
Stats: 47 lines in 2 files changed: 15 ins; 8 del; 24 mod
Patch: https://git.openjdk.org/jdk/pull/15249.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15249/head:pull/15249
PR: https://git.openjdk.org/jdk/pull/15249
More information about the net-dev
mailing list