Skip to content

The test AsyncThreadContextDefaultTest is unreliable #3049

Open
@garydgregory

Description

@garydgregory

Description

The test AsyncThreadContextDefaultTest is unreliable:

...
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   AsyncThreadContextDefaultTest.testAsyncLogWritesToLog:38->AbstractAsyncThreadContextTestBase.testAsyncLogWritesToLog:188->AbstractAsyncThreadContextTestBase.checkResult:221 [Log file 'AsyncLoggerTest.log']
expected: "INFO c.f.Bar mapvalue [stackvalue] {KEY=mapvalue, configProp=configValue, configProp2=configValue2} WEBAPP DefaultThreadContextMap AsyncLoggerContext i=0"
 but was: "INFO c.f.Bar mapvalue [stackvalue, stackvalue] {KEY=mapvalue, configProp=configValue, configProp2=configValue2} WEBAPP DefaultThreadContextMap AsyncLoggerContext i=0"
[ERROR] Errors:
[ERROR]   AsyncThreadContextDefaultTest.testAsyncLogWritesToLog:38->AbstractAsyncThreadContextTestBase.testAsyncLogWritesToLog:176 » ConditionTimeout Condition with Lambda expression in org.apache.logging.log4j.core.async.AbstractAsyncThreadContextTestBase was not fulfilled within 500 milliseconds.
[INFO]
[ERROR] Tests run: 3786, Failures: 1, Errors: 1, Skipped: 33
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Log4j BOM 2.25.0-SNAPSHOT:
[INFO]
[INFO] Apache Log4j BOM ................................... SUCCESS [ 44.982 s]
[INFO] Apache Log4j Parent ................................ SUCCESS [  3.181 s]
[INFO] Apache Log4j API Java 9 support .................... SUCCESS [ 14.568 s]
[INFO] Apache Log4j API ................................... SUCCESS [ 40.655 s]
[INFO] Apache Log4j Implementation Java 9 support ......... SUCCESS [  8.318 s]
[INFO] Apache Log4j Core .................................. SUCCESS [01:58 min]
[INFO] Apache Log4j API Tests ............................. SUCCESS [01:30 min]
[INFO] Apache Log4j Core Tests ............................ FAILURE [10:36 min]
...

Configuration

Version:

commit 38bc033443c85f9df68c9406fdacf32cb24d5143 (HEAD -> 2.x, origin/2.x)
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 1 19:53:17 2024 +0000

    Update `com.google.guava:guava` to version `33.3.1-jre` (#3009)

Operating system:

Microsoft Windows [Version 10.0.19045.4780]

JDK:

openjdk version "17.0.12" 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: C:\java\apache-maven-3.9.9
Java version: 17.0.12, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.12.7-hotspot
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Logs

Full build console output: https://gist.github.com/garydgregory/90e31d986dfaa66d721c3e593c3240e9

Reproduction

Run:

cls && git log -1 && mvn clean verify

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsPull requests or issues related to tests

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions