--- a/test/jdk/jdk/jfr/api/consumer/recordingstream/EventProducer.java Sat Oct 12 16:12:51 2019 +0200
+++ b/test/jdk/jdk/jfr/api/consumer/recordingstream/EventProducer.java Sun Oct 13 12:36:51 2019 +0200
@@ -25,10 +25,10 @@
synchronized (lock) {
this.killed = true;
lock.notifyAll();
- try {
- join();
- } catch (InterruptedException e) {
- }
- }
+ }
+ try {
+ join();
+ } catch (InterruptedException e) {
+ }
}
}
\ No newline at end of file
--- a/test/jdk/jdk/jfr/api/consumer/recordingstream/TestRecursive.java Sat Oct 12 16:12:51 2019 +0200
+++ b/test/jdk/jdk/jfr/api/consumer/recordingstream/TestRecursive.java Sun Oct 13 12:36:51 2019 +0200
@@ -123,22 +123,19 @@
private static void testSync() throws Exception {
try (Recording r = new Recording()) {
r.start();
- AtomicBoolean first = new AtomicBoolean();
EventProducer p = new EventProducer();
try (RecordingStream rs = new RecordingStream()) {
Recorded e1 = new Recorded();
e1.commit();
rs.onEvent(e -> {
- if (first.get()) {
- System.out.println("Emitting NotRecorded event");
- NotRecorded event = new NotRecorded();
- event.commit();
- System.out.println("Stopping event provoker");
- p.kill();
- System.out.println("Closing recording stream");
- rs.close();
- return;
- }
+ System.out.println("Emitting NotRecorded event");
+ NotRecorded event = new NotRecorded();
+ event.commit();
+ System.out.println("Stopping event provoker");
+ p.kill();
+ System.out.println("Closing recording stream");
+ rs.close();
+ return;
});
p.start();
rs.start();