changeset 30903:0c7d705209c6

8081566: java/lang/ProcessHandle/InfoTest.java failed on case sensitive command Reviewed-by: lancea, alanb
author rriggs
date Mon, 01 Jun 2015 10:29:06 -0400
parents cf3d869e9f79
children ec0224270f90 900ee6d02a1e
files jdk/test/java/lang/ProcessHandle/InfoTest.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java	Mon Jun 01 10:27:24 2015 -0400
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java	Mon Jun 01 10:29:06 2015 -0400
@@ -25,6 +25,9 @@
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.lang.ProcessBuilder;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.time.Duration;
 import java.time.Instant;
 import java.time.temporal.ChronoUnit;
@@ -148,8 +151,10 @@
                         String javaExe = System.getProperty("test.jdk") +
                                 File.separator + "bin" + File.separator + "java";
                         String expected = Platform.isWindows() ? javaExe + ".exe" : javaExe;
-                        Assert.assertEquals(command.get(), expected,
-                                "Command: expected: 'java'" + ", actual: " + command);
+                        Path expectedPath = Paths.get(expected);
+                        Path actualPath = Paths.get(command.get());
+                        Assert.assertTrue(Files.isSameFile(expectedPath, actualPath),
+                                "Command: expected: " + javaExe + ", actual: " + command.get());
                     }
 
                     if (info.arguments().isPresent()) {