8313854: Some tests in serviceability area fail on localized Windows platform

Reviewed-by: amenkov, cjplummer
This commit is contained in:
Kimura Yukihiro 2023-08-14 18:26:55 +00:00 committed by Chris Plummer
parent c132176b93
commit 49b29845f7
2 changed files with 6 additions and 1 deletions
test/jdk/sun
management/jmxremote/startstop
tools/jhsdb

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -393,6 +393,8 @@ public class JMXStartStopTest {
List<String> pbArgs = new ArrayList<>(Arrays.asList(
"-cp",
System.getProperty("test.class.path"),
"-Duser.language=en",
"-Duser.country=US",
"-XX:+UsePerfData"
));
pbArgs.addAll(Arrays.asList(args));

@ -158,6 +158,9 @@ public class JShellHeapDumpTest {
launcher.addVMArgs(Utils.getFilteredTestJavaOpts("-XX:\\+UseSerialGC"));
}
ProcessBuilder pb = new ProcessBuilder(launcher.getCommand());
// Needed so we can properly parse the "Welcome to JShell" output.
pb.command().add("-J-Duser.language=en");
pb.command().add("-J-Duser.country=US");
jShellProcess = ProcessTools.startProcess("JShell", pb,
s -> { // warm-up predicate
return s.contains("Welcome to JShell");