Skip to content

Commit b7ca76e

Browse files
author
SendaoYan
committed
8353235: Test jdk/jfr/api/metadata/annotations/TestPeriod.java fails with IllegalArgumentException
Reviewed-by: egahlin
1 parent bbd5b17 commit b7ca76e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/jdk/jdk/jfr/api/metadata/annotations/TestPeriod.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import jdk.jfr.Event;
2727
import jdk.jfr.EventType;
2828
import jdk.jfr.Period;
29+
import jdk.jfr.FlightRecorder;
2930
import jdk.test.lib.Asserts;
3031
import jdk.test.lib.jfr.Events;
3132

@@ -44,6 +45,7 @@ static class PeriodicEvent extends Event {
4445

4546
public static void main(String[] args) throws Exception {
4647
EventType periodicEvent = EventType.getEventType(PeriodicEvent.class);
48+
FlightRecorder.addPeriodicEvent(PeriodicEvent.class, () -> {});
4749
String defaultValue = Events.getSetting(periodicEvent, Period.NAME).getDefaultValue();
4850
Asserts.assertEQ(defaultValue, "47 s", "Incorrect default value for period");
4951
}

0 commit comments

Comments
 (0)