RFR: JDK-8240343: JDI stopListening/stoplis001 "FAILED: listening is successfully stopped without starting listening"
Chris Plummer
cjplummer at openjdk.org
Wed Apr 10 04:26:08 UTC 2024
On Wed, 10 Apr 2024 00:28:01 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> The test starts listening on dynamic port and calls stopListening with incorrect (cArgs1) and correct (cArgs2) argument maps.
> Incorrect map is created by finding "free" port (`(new ServerSocket(0)).getLocalPort()`)
> The test fails if the same port is selected later when the listening starts.
> To avoid this free port should be picked after listening on dynamic port started.
>
> Additionally removed unnecessary `exclusiveAccess.dirs=.` test property and incorrect comment in the description.
> The test uses `SocketListen` connectors, the coment is about `SharedMemoryListen` connector.
>
> Testing: run the test on all Oracle-supported platforms 100 times
test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis001.java line 98:
> 96: log.display("TEST: start listening the address " + addr);
> 97:
> 98: // argHandler.getTransportPort() returns a free port (different from the listening port in cArgs2)
Suggestion:
// argHandler.getTransportPort() returns a free port (different from the port allocated by startListen(cArgs2))
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18705#discussion_r1558821159
More information about the serviceability-dev
mailing list