Skip to content

Commit 4fc917c

Browse files
committed
8366486: Test jdk/jfr/event/profiling/TestCPUTimeSampleMultipleRecordings.java is timing out
Reviewed-by: jbachorik
1 parent f51e442 commit 4fc917c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleMultipleRecordings.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,23 @@
3939
* @run main/timeout=480 jdk.jfr.event.profiling.TestCPUTimeSampleMultipleRecordings
4040
*/
4141
public class TestCPUTimeSampleMultipleRecordings {
42-
43-
static String nativeEvent = EventNames.CPUTimeSample;
44-
4542
static volatile boolean alive = true;
4643

4744
public static void main(String[] args) throws Exception {
4845
Thread t = new Thread(TestCPUTimeSampleMultipleRecordings::nativeMethod);
49-
t.setDaemon(true);
5046
t.start();
5147
for (int i = 0; i < 2; i++) {
5248
try (RecordingStream rs = new RecordingStream()) {
53-
rs.enable(nativeEvent).with("throttle", "1ms");
54-
rs.onEvent(nativeEvent, e -> {
55-
alive = false;
49+
rs.enable(EventNames.CPUTimeSample).with("throttle", "1ms");
50+
rs.onEvent(EventNames.CPUTimeSample, e -> {
5651
rs.close();
5752
});
5853

5954
rs.start();
6055
}
6156
}
6257
alive = false;
58+
t.join();
6359
}
6460

6561
public static void nativeMethod() {

0 commit comments

Comments
 (0)