test/jdk/jdk/jfr/jcmd/JcmdHelper.java
changeset 50226 408021edf22f
parent 50113 caf115bb98ad
--- a/test/jdk/jdk/jfr/jcmd/JcmdHelper.java	Tue May 22 23:27:54 2018 +0200
+++ b/test/jdk/jdk/jfr/jcmd/JcmdHelper.java	Wed May 23 00:21:58 2018 +0200
@@ -43,9 +43,9 @@
             OutputAnalyzer output = jcmdCheck(name, false);
             try {
                 // The expected output can look like this:
-                // Recording: recording=1 name="Recording 1" (running)
-                output.shouldMatch("^Recording: recording=\\d+\\s+name=\"" + name
-                        + "\".*\\W{1}running\\W{1}");
+                // Recording 1: name=1 (running)
+                output.shouldMatch("^Recording \\d+: name=" + name
+                        + " .*\\W{1}running\\W{1}");
                 return;
             } catch (RuntimeException e) {
                 if (System.currentTimeMillis() > timeoutAt) {
@@ -56,19 +56,6 @@
         }
     }
 
-    // Wait until default recording's state became running
-    public static void waitUntilDefaultRecordingRunning() throws Exception {
-        while (true) {
-            OutputAnalyzer output = jcmd("JFR.check", "recording=0");
-            try {
-                output.shouldContain("Recording: recording=0 name=\"HotSpot default\" (running)");
-                return;
-            } catch (RuntimeException e) {
-                Thread.sleep(100);
-            }
-        }
-    }
-
     public static void stopAndCheck(String name) throws Exception {
         jcmd("JFR.stop", "name=\"" + name + "\"");
         assertRecordingNotRunning(name);