test/jdk/jdk/jfr/jcmd/TestJcmdLegacy.java
changeset 50745 a390cbb82d47
parent 50225 2942ae532175
child 51214 67736b4846a0
--- a/test/jdk/jdk/jfr/jcmd/TestJcmdLegacy.java	Sun Jun 24 16:25:47 2018 +0100
+++ b/test/jdk/jdk/jfr/jcmd/TestJcmdLegacy.java	Mon Jun 25 02:07:42 2018 +0200
@@ -28,6 +28,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 
 import jdk.jfr.Recording;
 import jdk.jfr.consumer.RecordedEvent;
@@ -58,13 +59,13 @@
 
     private static void testJcmd() throws Exception {
         String name = "testLegacy";
-        File p = new File(name + ".jfr");
+        Path p = Paths.get(name + ".jfr").toAbsolutePath().normalize();
         OutputAnalyzer output = JcmdHelper.jcmd("JFR.start", "name=" + name, "settings=" + SETTINGS.getCanonicalPath());
         JcmdAsserts.assertRecordingHasStarted(output);
         JcmdHelper.waitUntilRunning(name);
-        JcmdHelper.stopWriteToFileAndCheck(name, p);
-        FileHelper.verifyRecording(p);
-        verify(p.toPath());
+        JcmdHelper.stopWriteToFileAndCheck(name, p.toFile());
+        FileHelper.verifyRecording(p.toFile());
+        verify(p);
     }
 
     private static void testAPI() throws IOException, Exception {