test/jdk/jdk/jfr/api/consumer/security/TestStreamingLocal.java
branchJEP-349-branch
changeset 58820 8412a437a4bc
parent 58076 ca625d28c580
equal deleted inserted replaced
58806:a7d850b47b19 58820:8412a437a4bc
    49         CountDownLatch latch = new CountDownLatch(1);
    49         CountDownLatch latch = new CountDownLatch(1);
    50         try (Recording r = new Recording()) {
    50         try (Recording r = new Recording()) {
    51             // Enable JVM event, no write permission needed
    51             // Enable JVM event, no write permission needed
    52             r.enable(EventNames.JVMInformation);
    52             r.enable(EventNames.JVMInformation);
    53             r.start();
    53             r.start();
       
    54             try (Recording r2 = new Recording()){
       
    55                 r2.start();
       
    56                 r2.stop();
       
    57             }
    54             r.stop();
    58             r.stop();
    55             try (EventStream es = EventStream.openRepository()) {
    59             try (EventStream es = EventStream.openRepository()) {
    56                 es.setStartTime(Instant.EPOCH);
    60                 es.setStartTime(Instant.EPOCH);
    57                 es.onEvent("jdk.JVMInformation", e -> {
    61                 es.onEvent("jdk.JVMInformation", e -> {
    58                     latch.countDown();
    62                     latch.countDown();