RFR: 8206187: javax/management/remote/mandatory/connection/DefaultAgentFilterTest.java fails with Port already in use

Kevin Walls kevinw at openjdk.java.net
Thu Feb 24 11:40:03 UTC 2022


On Wed, 23 Feb 2022 17:42:35 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

> The test uses warm-up predicate in a strange way

Thanks Alex - yes so that's why we only see one line in the predicate, it contains the word "exception" and the predicate returns true, signalling that the process is done starting up. 8-)
But if you do see an exception, you're never going to see the text from the app that it has started OK, so I see why it was returning true always - we were either seeing an error, or otherwise we presume TestApp has started.
But it returned true after seeing the first line, which does not contain "bindexception", so it never saw the BindException later to recognise the port being in use.

Anyway...
I will update shortly to hopefully clarify the predicate part.  Still good to keep main() simpler and not have duplicated retry logic there.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7589


More information about the serviceability-dev mailing list