mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-01 19:50:05 +00:00
8081566: java/lang/ProcessHandle/InfoTest.java failed on case sensitive command
Reviewed-by: lancea, alanb
This commit is contained in:
parent
0b4d0d4fec
commit
ea68abc64e
@ -25,6 +25,9 @@ import java.io.File;
|
||||
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 @@ public class InfoTest {
|
||||
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()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user