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
--- 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();