RFR: 8314476: TestJstatdPortAndServer.java failed with "java.rmi.NoSuchObjectException: no such object in table" [v2]
Mark Sheppard
msheppar at openjdk.org
Thu Aug 24 18:11:31 UTC 2023
On Thu, 24 Aug 2023 14:57:47 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
>> Several tests from test/jdk/sun/tools/jstatd are intermittent.
>>
>> Port clashes when run at the same time on the same machine have been a problem.
>> The RMI error "no such object in table" can mean a reference on the RMI server has been GC'd.
>> Either way, jstatd fails to startup and and the test fails.
>>
>> These both have jstatd reporting "Could not bind" which should be recognised and retried, as we already do for (some) port in use problems. i.e. JstatdTest.java: the isJstadReady() method (will correct that typo also) checks for "Port already in use", which can be printed by TCPTransport.java.
>>
>> Should update its test to check for "Could not bind".
>> Should limit the retries also.
>
> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision:
>
> Less specific error message, could be ports or other failure..
test/jdk/sun/tools/jstatd/JstatdTest.java line 327:
> 325: int tries = 0;
> 326: try {
> 327: while (jstatdThread == null && ++tries <= 10) {
maybe use a ubiquitous constant MAX_RETRY (private static final in MAX_RETRY = 10)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15414#discussion_r1304694460
More information about the core-libs-dev
mailing list