changeset 51413:7284ce754713

8196213: sun/security/tools/jarsigner/warnings/NoTimestampTest.java test fails on ar_SA locale. Reviewed-by: naoto Contributed-by: dan.z.zhou@oracle.com
author xiaofeya
date Mon, 25 Jun 2018 20:03:46 -0700
parents bba1deda9216
children c9f193a8b671
files test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java	Tue Jun 26 10:43:50 2018 +0800
+++ b/test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java	Mon Jun 25 20:03:46 2018 -0700
@@ -22,12 +22,13 @@
  */
 
 import java.util.Date;
+import java.util.Locale;
 import jdk.testlibrary.OutputAnalyzer;
 import jdk.test.lib.util.JarUtils;
 
 /**
  * @test
- * @bug 8024302 8026037
+ * @bug 8024302 8026037 8196213
  * @summary Checks warnings if -tsa and -tsacert options are not specified
  * @library /lib/testlibrary /test/lib ../
  * @build jdk.test.lib.util.JarUtils
@@ -40,8 +41,16 @@
      * and checks that proper warnings are shown.
      */
     public static void main(String[] args) throws Throwable {
-        NoTimestampTest test = new NoTimestampTest();
-        test.start();
+        Locale reservedLocale = Locale.getDefault();
+        Locale.setDefault(Locale.US);
+
+        try {
+            NoTimestampTest test = new NoTimestampTest();
+            test.start();
+        } finally {
+            // Restore the reserved locale
+            Locale.setDefault(reservedLocale);
+        }
     }
 
     private void start() throws Throwable {