You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gilles Sadowski <gi...@gmail.com> on 2022/12/07 00:18:12 UTC

[Lang] "CalendarUtilsTest" fails, or not...

Hello.

Running
  $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn test
[... skipped ...]
[ERROR] Failures:
[ERROR]   CalendarUtilsTest.testGetDayOfMonth:32 expected: <7> but was: <6>
[ERROR]   CalendarUtilsTest.testGetDayOfYear:37 expected: <341> but was: <340>
[INFO]
[ERROR] Tests run: 7330, Failures: 2, Errors: 0, Skipped: 7
[...]


Running
  $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn
-Dtest=CalendarUtilsTest test
[... skipped ...]
[INFO] Running org.apache.commons.lang3.time.CalendarUtilsTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
0.089 s - in org.apache.commons.lang3.time.CalendarUtilsTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
[...]

Environment:
  $ mvn -v
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.16, vendor: Debian, runtime:
/usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.0-17-amd64", arch: "amd64", family: "unix"

Regards,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [Lang] "CalendarUtilsTest" fails, or not...

Posted by Gilles Sadowski <gi...@gmail.com>.
Le mer. 7 déc. 2022 à 10:04, sebb <se...@gmail.com> a écrit :
>
> This could be caused by tests occurring in random order. If there is a
> test that changes the global locale, and fails to reset it, behaviour
> will depend on when the failing test is run in relation to others. If
> you still have the logs, try comparing the order of tests.

Attached in JIRA report:
    https://issues.apache.org/jira/browse/LANG-1693

Regards,
Gilles

>>> [...]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [Lang] "CalendarUtilsTest" fails, or not...

Posted by sebb <se...@gmail.com>.
This could be caused by tests occurring in random order. If there is a
test that changes the global locale, and fails to reset it, behaviour
will depend on when the failing test is run in relation to others. If
you still have the logs, try comparing the order of tests.

On Wed, 7 Dec 2022 at 01:34, Gary Gregory <ga...@gmail.com> wrote:
>
> Interesting, the GH builds are green:
> https://github.com/apache/commons-lang/actions
>
> But the environment is different from yours:
>
> Maven home: /usr/share/apache-maven-3.8.6
> Java version: 11.0.17, vendor: Eclipse Adoptium, runtime:
> /usr/lib/jvm/temurin-11-jdk-amd64
> Default locale: en, platform encoding: UTF-8
> OS name: "linux", version: "5.15.0-1023-azure", arch: "amd64", family:
> "unix"
>
> Gary
>
> On Tue, Dec 6, 2022, 19:18 Gilles Sadowski <gi...@gmail.com> wrote:
>
> > Hello.
> >
> > Running
> >   $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn test
> > [... skipped ...]
> > [ERROR] Failures:
> > [ERROR]   CalendarUtilsTest.testGetDayOfMonth:32 expected: <7> but was: <6>
> > [ERROR]   CalendarUtilsTest.testGetDayOfYear:37 expected: <341> but was:
> > <340>
> > [INFO]
> > [ERROR] Tests run: 7330, Failures: 2, Errors: 0, Skipped: 7
> > [...]
> >
> >
> > Running
> >   $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn
> > -Dtest=CalendarUtilsTest test
> > [... skipped ...]
> > [INFO] Running org.apache.commons.lang3.time.CalendarUtilsTest
> > [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> > 0.089 s - in org.apache.commons.lang3.time.CalendarUtilsTest
> > [INFO]
> > [INFO] Results:
> > [INFO]
> > [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
> > [...]
> >
> > Environment:
> >   $ mvn -v
> > Apache Maven 3.6.3
> > Maven home: /usr/share/maven
> > Java version: 11.0.16, vendor: Debian, runtime:
> > /usr/lib/jvm/java-11-openjdk-amd64
> > Default locale: en_US, platform encoding: UTF-8
> > OS name: "linux", version: "5.10.0-17-amd64", arch: "amd64", family: "unix"
> >
> > Regards,
> > Gilles
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [Lang] "CalendarUtilsTest" fails, or not...

Posted by Gary Gregory <ga...@gmail.com>.
Interesting, the GH builds are green:
https://github.com/apache/commons-lang/actions

But the environment is different from yours:

Maven home: /usr/share/apache-maven-3.8.6
Java version: 11.0.17, vendor: Eclipse Adoptium, runtime:
/usr/lib/jvm/temurin-11-jdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.15.0-1023-azure", arch: "amd64", family:
"unix"

Gary

On Tue, Dec 6, 2022, 19:18 Gilles Sadowski <gi...@gmail.com> wrote:

> Hello.
>
> Running
>   $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn test
> [... skipped ...]
> [ERROR] Failures:
> [ERROR]   CalendarUtilsTest.testGetDayOfMonth:32 expected: <7> but was: <6>
> [ERROR]   CalendarUtilsTest.testGetDayOfYear:37 expected: <341> but was:
> <340>
> [INFO]
> [ERROR] Tests run: 7330, Failures: 2, Errors: 0, Skipped: 7
> [...]
>
>
> Running
>   $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn
> -Dtest=CalendarUtilsTest test
> [... skipped ...]
> [INFO] Running org.apache.commons.lang3.time.CalendarUtilsTest
> [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> 0.089 s - in org.apache.commons.lang3.time.CalendarUtilsTest
> [INFO]
> [INFO] Results:
> [INFO]
> [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
> [...]
>
> Environment:
>   $ mvn -v
> Apache Maven 3.6.3
> Maven home: /usr/share/maven
> Java version: 11.0.16, vendor: Debian, runtime:
> /usr/lib/jvm/java-11-openjdk-amd64
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "5.10.0-17-amd64", arch: "amd64", family: "unix"
>
> Regards,
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>