Only test setReuse within chunk (for now) JEP-349-branch
authoregahlin
Thu, 30 May 2019 23:12:44 +0200
branchJEP-349-branch
changeset 57381 ce265e404c64
parent 57380 6a7e7743b82f
child 57385 7d9d4f629f6e
Only test setReuse within chunk (for now)
test/jdk/jdk/jfr/api/consumer/filestream/TestReuse.java
--- a/test/jdk/jdk/jfr/api/consumer/filestream/TestReuse.java	Thu May 30 23:04:50 2019 +0200
+++ b/test/jdk/jdk/jfr/api/consumer/filestream/TestReuse.java	Thu May 30 23:12:44 2019 +0200
@@ -66,7 +66,7 @@
             es.onEvent(e -> {
                 if (identity.containsKey(e)) {
                     fail.set(true);
-                    throw new Error("Unexpected reuse!");
+                    es.close();
                 }
                 identity.put(e, e);
             });
@@ -88,7 +88,7 @@
                 } else {
                     if (e != event.get()) {
                         fail.set(true);
-                        throw new Error("No reuse!");
+                        es.close();
                     }
                 }
             });
@@ -102,7 +102,7 @@
     private static Path makeRecording() throws IOException {
         try (Recording r = new Recording()) {
             r.start();
-            for (int i = 0; i < 2_000_000; i++) {
+            for (int i = 0; i < 1_000; i++) {
                 ReuseEvent e = new ReuseEvent();
                 e.commit();
             }