Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/jdk/jdk/jfr/api/consumer/streaming/TestProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public TestProcess(String name, boolean createCore) throws IOException {
};
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(args);
process = ProcessTools.startProcess(name, pb);

// give the process a chance to awake (and to be seen from other threads)
takeLongNap();
}

public static void main(String... args) throws Exception {
Expand Down Expand Up @@ -99,6 +102,14 @@ public Path getRepository() throws Exception {
return StreamingUtils.getJfrRepository(process);
}

private static void takeLongNap() {
try {
Thread.sleep(1000);
} catch (InterruptedException ie) {
// ignore
}
}

private static void takeNap() {
try {
Thread.sleep(10);
Expand Down