From 2b0c0b9bc8a01719e74b844563f8003964b006f6 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sat, 25 May 2024 09:37:14 -0400 Subject: [PATCH] Rename and enable old test --- .../lang3/time/DurationFormatUtilsTest.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java index e5441fb92..5f7aa0793 100644 --- a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java @@ -523,15 +523,18 @@ public class DurationFormatUtilsTest extends AbstractLangTest { new int[] { 2006, 9, 6, 0, 0, 0 }, "MM"); } - // Takes a minute to run, so generally turned off -// public void testBrutally() { -// Calendar c = Calendar.getInstance(); -// c.set(2004, 0, 1, 0, 0, 0); -// for (int i=0; i < FOUR_YEARS; i++) { -// bruteForce(c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH), "d", Calendar.DAY_OF_MONTH ); -// c.add(Calendar.DAY_OF_MONTH, 1); -// } -// } + /** + * Takes 8 seconds to run. + */ + @Test + public void testFourYears() { + Calendar c = Calendar.getInstance(); + c.set(2004, 0, 1, 0, 0, 0); + for (int i = 0; i < FOUR_YEARS; i++) { + bruteForce(c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH), "d", Calendar.DAY_OF_MONTH); + c.add(Calendar.DAY_OF_MONTH, 1); + } + } @Test public void testLANG815() {