--- a/test/jdk/jdk/jfr/event/metadata/TestLookForUntestedEvents.java Wed Sep 18 18:15:29 2019 +0200
+++ b/test/jdk/jdk/jfr/event/metadata/TestLookForUntestedEvents.java Thu Sep 19 17:33:18 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,13 @@
Arrays.asList("DumpReason")
);
+ // Experimental events
+ private static final Set<String> experimentalEvents = new HashSet<>(
+ Arrays.asList(
+ "Flush", "FlushStorage", "FlushStacktrace",
+ "FlushStringPool", "FlushMetadata", "FlushTypeSet")
+ );
+
public static void main(String[] args) throws Exception {
for (EventType type : FlightRecorder.getFlightRecorder().getEventTypes()) {
@@ -138,6 +145,10 @@
}
}
+ // remove experimental events from eventsFromEventNamesClass since jfrEventTypes
+ // excludes experimental events
+ eventsFromEventNamesClass.removeAll(experimentalEvents);
+
if (!jfrEventTypes.equals(eventsFromEventNamesClass)) {
String exceptionMsg = "Events declared in jdk.test.lib.jfr.EventNames differ " +
"from events returned by FlightRecorder.getEventTypes()";