8353235: Test jdk/jfr/api/metadata/annotations/TestPeriod.java fails with IllegalArgumentException

Reviewed-by: egahlin
This commit is contained in:
SendaoYan 2025-03-31 15:45:23 +00:00
parent bbd5b174c5
commit b7ca76ef4b

View File

@ -26,6 +26,7 @@ package jdk.jfr.api.metadata.annotations;
import jdk.jfr.Event;
import jdk.jfr.EventType;
import jdk.jfr.Period;
import jdk.jfr.FlightRecorder;
import jdk.test.lib.Asserts;
import jdk.test.lib.jfr.Events;
@ -44,6 +45,7 @@ public class TestPeriod {
public static void main(String[] args) throws Exception {
EventType periodicEvent = EventType.getEventType(PeriodicEvent.class);
FlightRecorder.addPeriodicEvent(PeriodicEvent.class, () -> {});
String defaultValue = Events.getSetting(periodicEvent, Period.NAME).getDefaultValue();
Asserts.assertEQ(defaultValue, "47 s", "Incorrect default value for period");
}