diff --git a/test/test/jfr/JfrTests.java b/test/test/jfr/JfrTests.java index f3466de5e..b5318d8c3 100644 --- a/test/test/jfr/JfrTests.java +++ b/test/test/jfr/JfrTests.java @@ -22,12 +22,14 @@ public class JfrTests { public void regularPeak(TestProcess p) throws Exception { Output out = p.profile("-e cpu -d 6 -f %f.jfr"); String jfrOutPath = p.getFile("%f").getAbsolutePath(); + String peakPattern = "test/jfr/Cache.*calculateTop.*"; + out = Output.convertJfrToCollapsed(jfrOutPath, "--to", "2500"); - assert !out.contains("test/jfr/Cache\\.calculateTop"); + assert !out.contains(peakPattern); out = Output.convertJfrToCollapsed(jfrOutPath,"--from", "2500", "--to", "5000"); - assert out.samples("test/jfr/Cache\\.calculateTop") >= 1; + assert out.samples(peakPattern) >= 1; out = Output.convertJfrToCollapsed(jfrOutPath,"--from", "5000"); - assert !out.contains("test/jfr/Cache\\.calculateTop"); + assert !out.contains(peakPattern); } /**