From 7b960a2e592fdc1b70a77a48745aba1237ae758a Mon Sep 17 00:00:00 2001 From: Roger Riggs Date: Wed, 27 May 2015 15:57:10 -0400 Subject: [PATCH] 8081022: java/time/test/java/time/format/TestZoneTextPrinterParser.java fails by timeout on slow device Reduce number of iterations to 8 instead of 50 Reviewed-by: naoto --- jdk/test/java/time/TEST.properties | 1 + .../java/time/format/TestZoneTextPrinterParser.java | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/jdk/test/java/time/TEST.properties b/jdk/test/java/time/TEST.properties index 909c6193da8..f480a511913 100644 --- a/jdk/test/java/time/TEST.properties +++ b/jdk/test/java/time/TEST.properties @@ -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 diff --git a/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java b/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java index 28ccbfe0516..079af06d9d6 100644 --- a/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java +++ b/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java @@ -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.Locale; 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 class TestZoneTextPrinterParser extends AbstractTestPrinterParser { } public void test_printText() { - Random r = new Random(); - int N = 50; + Random r = RandomFactory.getRandom(); + int N = 8; Locale[] locales = Locale.getAvailableLocales(); Set zids = ZoneRulesProvider.getAvailableZoneIds(); ZonedDateTime zdt = ZonedDateTime.now();