You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/08/24 21:12:16 UTC

(commons-lang) branch master updated (406de7827 -> 1b874908a)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


    from 406de7827 Use @DefaultLocale(language = "en", country = "US") for some tests
     new ace5aae4b Rename some test methods
     new 1b874908a Fix bug in test

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/commons/lang3/time/DateUtilsTest.java  | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


(commons-lang) 01/02: Rename some test methods

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit ace5aae4bd46f44888dc062d654b3a93ace8027d
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Aug 24 17:00:56 2025 -0400

    Rename some test methods
---
 src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
index 82399125e..74e5421e2 100644
--- a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
@@ -1319,7 +1319,7 @@ void testToLocalDateTime(final LocalDateTime expected, final Date date, final Ti
     @MethodSource("testToLocalDateTimeTimeZone")
     @DefaultLocale(language = "en", country = "US")
     @DefaultTimeZone("GMT")
-    void testToLocalDateTimeTimeZoneGmt(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
+    void testToLocalDateTimeTimeZone(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
         assertEquals(expected, DateUtils.toLocalDateTime(date, timeZone),
                 () -> String.format("expected = %s, date = %s, timeZone = %s, TimeZone.getDefault() = %s", expected, date, timeZone, TimeZone.getDefault()));
     }
@@ -1328,7 +1328,7 @@ void testToLocalDateTimeTimeZoneGmt(final LocalDateTime expected, final Date dat
     @MethodSource("testToLocalDateTimeTimeZone")
     @DefaultLocale(language = "en", country = "US")
     @DefaultTimeZone("GMT")
-    void testToOffsetDateTimeGmt(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
+    void testToOffsetDateTime(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
         final OffsetDateTime offsetDateTime = DateUtils.toOffsetDateTime(date);
         assertEquals(OffsetDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()), offsetDateTime,
                 () -> String.format("expected = %s, date = %s, timeZone = %s, TimeZone.getDefault() = %s", expected, date, timeZone, TimeZone.getDefault()));
@@ -1338,7 +1338,7 @@ void testToOffsetDateTimeGmt(final LocalDateTime expected, final Date date, fina
     @MethodSource("testToLocalDateTimeTimeZone")
     @DefaultLocale(language = "en", country = "US")
     @DefaultTimeZone("GMT")
-    void testToOffsetDateTimeTimeZoneGmt(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
+    void testToOffsetDateTimeTimeZone(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
         assertEquals(expected, DateUtils.toOffsetDateTime(date, timeZone).toLocalDateTime(),
                 () -> String.format("expected = %s, date = %s, timeZone = %s, TimeZone.getDefault() = %s", expected, date, timeZone, TimeZone.getDefault()));
     }
@@ -1347,7 +1347,7 @@ void testToOffsetDateTimeTimeZoneGmt(final LocalDateTime expected, final Date da
     @MethodSource("testToLocalDateTimeTimeZone")
     @DefaultLocale(language = "en", country = "US")
     @DefaultTimeZone("GMT")
-    void testToZonedDateTimeGmt(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
+    void testToZonedDateTime(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
         final ZonedDateTime zonedDateTime = DateUtils.toZonedDateTime(date);
         assertEquals(ZonedDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()), zonedDateTime,
                 () -> String.format("expected = %s, date = %s, timeZone = %s, TimeZone.getDefault() = %s", expected, date, timeZone, TimeZone.getDefault()));
@@ -1360,7 +1360,7 @@ void testToZonedDateTimeGmt(final LocalDateTime expected, final Date date, final
     @DefaultLocale(language = "en", country = "US")
     @MethodSource("testToLocalDateTimeTimeZone")
     @DefaultTimeZone("GMT")
-    void testToZonedDateTimeTimeZoneGmt(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
+    void testToZonedDateTimeTimeZone(final LocalDateTime expected, final Date date, final TimeZone timeZone) {
         final ZonedDateTime zonedDateTime = DateUtils.toZonedDateTime(date, timeZone);
         assertEquals(expected, zonedDateTime.toOffsetDateTime().toLocalDateTime(),
                 () -> String.format("expected = %s, date = %s, timeZone = %s, TimeZone.getDefault() = %s", expected, date, timeZone, TimeZone.getDefault()));


(commons-lang) 02/02: Fix bug in test

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 1b874908aacdf7cb7cf5cc3a911fa94610f4213f
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Aug 24 17:12:10 2025 -0400

    Fix bug in test
---
 src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
index 74e5421e2..85c8d29d0 100644
--- a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
@@ -142,12 +142,12 @@ private static Stream<Arguments> testToLocalDateTimeTimeZone() {
                 Arguments.of(
                         LocalDateTime.ofInstant(Instant.EPOCH, TimeZone.getTimeZone("GMT").toZoneId()),
                         java.sql.Timestamp.valueOf("1970-01-01 00:00:00"),
-                        TimeZone.getTimeZone("America/New_York")
+                        TimeZone.getTimeZone("GMT")
                 ),
                 Arguments.of(
                         LocalDateTime.ofInstant(Instant.EPOCH.minus(1, ChronoUnit.DAYS), TimeZone.getTimeZone("GMT").toZoneId()),
                         java.sql.Timestamp.valueOf("1969-12-31 00:00:00"),
-                        TimeZone.getTimeZone("America/New_York")
+                        TimeZone.getTimeZone("GMT")
                 ),
                 Arguments.of(
                         LocalDateTime.ofInstant(