8241695: JFR TestCrossProcessStreaming.java child process exited with SIGQUIT (131)
Waiting for child's main() to start before attaching Reviewed-by: egahlin
This commit is contained in:
parent
6351f95bc1
commit
1a40b7931a
@ -127,13 +127,18 @@ public class TestCrossProcessStreaming {
|
||||
}
|
||||
|
||||
static class EventProducer {
|
||||
private static final String MAIN_STARTED = "MAIN_STARTED";
|
||||
|
||||
static Process start() throws Exception {
|
||||
String[] args = {"-XX:StartFlightRecording", EventProducer.class.getName()};
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(false, args);
|
||||
return ProcessTools.startProcess("Event-Producer", pb);
|
||||
return ProcessTools.startProcess("Event-Producer", pb,
|
||||
line -> line.contains(MAIN_STARTED),
|
||||
0, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
public static void main(String... args) throws Exception {
|
||||
System.out.println(MAIN_STARTED);
|
||||
ResultEvent rs = new ResultEvent();
|
||||
rs.batch1Count = emit(TestEvent1.class, "second-batch");
|
||||
rs.batch2Count = emit(TestEvent2.class, "exit");
|
||||
|
Loading…
x
Reference in New Issue
Block a user