From f55164f28e1a720d2ec7e27a6ebfe7e501710dd6 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Wed, 7 Dec 2022 09:40:56 -0500 Subject: Reset TimeZone after test --- .../java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 8fc9d19c3..00f55351e 100644 --- a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java @@ -32,6 +32,7 @@ import java.util.TimeZone; import org.apache.commons.lang3.AbstractLangTest; import org.junit.jupiter.api.Test; +import org.junitpioneer.jupiter.DefaultTimeZone; /** * TestCase for DurationFormatUtils. @@ -106,8 +107,9 @@ public class DurationFormatUtilsTest extends AbstractLangTest { //bruteForce(1996, 1, 29, "M", Calendar.MONTH); // this will fail } - // Attempting to test edge cases in DurationFormatUtils.formatPeriod + /** Attempting to test edge cases in DurationFormatUtils.formatPeriod. */ @Test + @DefaultTimeZone(TimeZones.GMT_ID) public void testEdgeDurations() { // This test case must use a time zone without DST TimeZone.setDefault(FastTimeZone.getGmtTimeZone()); -- cgit v1.2.3