8028771: regression test java/util/Locale/LocaleProviders.sh failed
authornaoto
Wed, 27 Nov 2013 10:01:08 -0800
changeset 21853 8aa7444a01a8
parent 21852 5059284b03a0
child 21854 3e0f1ef7cccc
child 21943 0fdb9441797f
8028771: regression test java/util/Locale/LocaleProviders.sh failed Reviewed-by: alanb
jdk/test/java/util/Locale/LocaleProviders.java
jdk/test/java/util/Locale/LocaleProviders.sh
--- a/jdk/test/java/util/Locale/LocaleProviders.java	Wed Nov 27 09:56:38 2013 +0800
+++ b/jdk/test/java/util/Locale/LocaleProviders.java	Wed Nov 27 10:01:08 2013 -0800
@@ -80,6 +80,12 @@
 
     static void adapterTest(String expected, String lang, String ctry) {
         Locale testLocale = new Locale(lang, ctry);
+        LocaleProviderAdapter ldaExpected =
+            LocaleProviderAdapter.forType(LocaleProviderAdapter.Type.valueOf(expected));
+        if (!ldaExpected.getDateFormatProvider().isSupportedLocale(testLocale)) {
+            System.out.println("test locale: "+testLocale+" is not supported by the expected provider: "+ldaExpected+". Ignoring the test.");
+            return;
+        }
         String preference = System.getProperty("java.locale.providers", "");
         LocaleProviderAdapter lda = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, testLocale);
         LocaleProviderAdapter.Type type = lda.getAdapterType();
--- a/jdk/test/java/util/Locale/LocaleProviders.sh	Wed Nov 27 09:56:38 2013 +0800
+++ b/jdk/test/java/util/Locale/LocaleProviders.sh	Wed Nov 27 10:01:08 2013 -0800
@@ -24,7 +24,7 @@
 #
 # @test
 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
-#      8013086 8013233 8013903 8015960
+#      8013086 8013233 8013903 8015960 8028771
 # @summary tests for "java.locale.providers" system property
 # @compile -XDignore.symbol.file LocaleProviders.java
 # @run shell/timeout=600 LocaleProviders.sh