changeset 30812:50187495b0c7

8081022: java/time/test/java/time/format/TestZoneTextPrinterParser.java fails by timeout on slow device Summary: Reduce number of iterations to 8 instead of 50 Reviewed-by: naoto
author rriggs
date Wed, 27 May 2015 15:57:10 -0400
parents 58432ddf9528
children 302fa7e3d2f0
files jdk/test/java/time/TEST.properties jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/time/TEST.properties	Wed May 27 12:23:35 2015 -0700
+++ b/jdk/test/java/time/TEST.properties	Wed May 27 15:57:10 2015 -0400
@@ -1,3 +1,4 @@
 # Threeten test uses TestNG
 TestNG.dirs = .
 othervm.dirs = tck/java/time/chrono test/java/time/chrono test/java/time/format
+lib.dirs = ../../lib/testlibrary
--- a/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Wed May 27 12:23:35 2015 -0700
+++ b/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Wed May 27 15:57:10 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -42,10 +42,17 @@
 import java.util.Random;
 import java.util.Set;
 import java.util.TimeZone;
+import jdk.testlibrary.RandomFactory;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
+/*
+ * @test
+ * @bug 8081022
+ * @key randomness
+ */
+
 /**
  * Test ZoneTextPrinterParser
  */
@@ -59,8 +66,8 @@
     }
 
     public void test_printText() {
-        Random r = new Random();
-        int N = 50;
+        Random r = RandomFactory.getRandom();
+        int N = 8;
         Locale[] locales = Locale.getAvailableLocales();
         Set<String> zids = ZoneRulesProvider.getAvailableZoneIds();
         ZonedDateTime zdt = ZonedDateTime.now();