8242789: sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java fails with 'JShellToolProvider' missing from stdout/stderr

Reviewed-by: amenkov, sspitsyn
This commit is contained in:
Chris Plummer 2020-04-21 16:13:24 -07:00
parent d80f55e7e9
commit d041941e64
2 changed files with 5 additions and 2 deletions

@ -940,7 +940,7 @@ java/util/ServiceLoader/ReloadTest.java 8242935 generic-all
# svc_tools
sun/tools/jhsdb/BasicLauncherTest.java 8211767 linux-ppc64,linux-ppc64le
sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8231634,8242789 generic-all
sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8231634 generic-all
############################################################################

@ -98,7 +98,10 @@ public class JShellHeapDumpTest {
public static void printStackTraces(String file) throws IOException {
try {
String output = HprofReader.getStack(file, 0);
if (!output.contains("JShellToolProvider")) {
// We only require JShellToolProvider to be in the output if we did the
// short sleep. If we did not, the java process may not have executed far
// enough along to even start the main thread.
if (doSleep && !output.contains("JShellToolProvider")) {
throw new RuntimeException("'JShellToolProvider' missing from stdout/stderr");
}
} catch (Exception ex) {