RFR: 8316562: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java times out after JDK-8314829

David Holmes dholmes at openjdk.org
Wed Sep 20 04:58:38 UTC 2023


On Wed, 20 Sep 2023 03:56:28 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> Test start failing because of unexpected VM logging.
> The fix is to search expected string ignoring any unknown output from forked process.
> Tested with tier1 and by running test with various options used in CI.

Can't you just change the loop:

while ((pidstring = largeHeapScanner.findInLine("PID\[[0-9].*\]")) == null) {
    Thread.sleep(500);
}

to something like:

while ((pidstring = largeHeapScanner.findInLine("PID\[[0-9].*\]")) == null) {
    largeHeapScanner.nextLine();
}

to check each line of output until there is a match?

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

PR Review: https://git.openjdk.org/jdk/pull/15833#pullrequestreview-1634627796


More information about the serviceability-dev mailing list