--- 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();
}