RFR: 8286873: Improve websocket test execution time
Pavel Rappo
prappo at openjdk.java.net
Thu May 19 09:26:39 UTC 2022
On Tue, 17 May 2022 12:45:52 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
> This PR improves the execution time of jdk_net tests (and, by extension, tier2) by about 3 minutes.
>
> Tests located under `jdk/java/net/httpclient/websocket` are never run in parallel. Each of the 8 modified `Pending***` tests originally required 40 seconds to complete. After the proposed changes, they usually complete in 15 seconds.
>
> This PR modifies the tests to initially run with 1 second timeout. If the test fails with 1 second timeout, it is retried with timeout increased to 10 seconds (the original value).
>
> The modified tests were executed at least 10 times on each of: Windows, Linux (both x64 and aarch64), MacOS (both x64 and aarch64). No failures were observed.
I have poor recollection of the mechanics of these tests.
The source of wait is timed get and `assertHang`. You are reducing the former. That looks good.
What looks questionable is rearrangement of asserts: when `assertHangs` moves down. assertNotDone(cfClose) can transitorry pass even if ping has not hung.
Tiriviality: since you are here, please remove
1. superfluous "are" on BlowupOutputQueue:60
2. "the a" on BlowupOutputQueue:63
test/jdk/java/net/httpclient/websocket/PendingOperations.java line 44:
> 42: static final Class<IOException> IOE = IOException.class;
> 43: // Time after which we deem that the local send buffer and remote
> 44: // receive buffer must be full. This has been heuristically determined.
"Heuristically" was a weird word to use here; should've been "empirically", I think. You deleted the whole sentence, which is okay too.
-------------
Changes requested by prappo (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/8746
More information about the net-dev
mailing list