Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x: WithSpanWithExplicitAppTest fails (always) on local machine #8249

Closed
tomas-langer opened this issue Jan 17, 2024 · 6 comments
Closed

4.x: WithSpanWithExplicitAppTest fails (always) on local machine #8249

tomas-langer opened this issue Jan 17, 2024 · 6 comments
Labels
bug Something isn't working microprofile telemetry

Comments

@tomas-langer
Copy link
Member

tomas-langer commented Jan 17, 2024

The following config exists in pom:

<!-- The test times out in the pipeline, even with very long retry delays. -->
<excludes>
    <exclude>**/WithSpanWithExplicitAppTest.java</exclude>
</excludes>

Yet I have this test failing on local machine consistently (tried 10 times, could not pass it). Maybe there is a real problem with the test, not an intermittent issue...

Could reproduce when running from IDE - the test passes if run as a single test, but fails if run with other tests in the package.

Failures:

[INFO]
[ERROR] Failures:
[ERROR]   WithSpanWithExplicitAppTest.testExplicitAppSpanNameFromPath:37->WithSpanTestBase.testSpanNameFromPath:67 Expected span count
Expected: an iterable with size <2>
     but: iterable size was <0>
[ERROR]   WithSpanWithExplicitAppTest.testExplicitAppSpanNameFromPath:37->WithSpanTestBase.testSpanNameFromPath:67 Expected span count
Expected: an iterable with size <2>
     but: iterable size was <0>
@tomas-langer tomas-langer added bug Something isn't working telemetry microprofile labels Jan 17, 2024
@tomas-langer
Copy link
Member Author

The following fixes the test (running each test in its own VM):

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <reuseForks>false</reuseForks>
                </configuration>
            </plugin>

@tomas-langer
Copy link
Member Author

So the problem is definitely interference between tests.
Possibility - is it maybe possible that the OpenTelemetry discovers the exporter just once? Then it would use the first exporter from the first CDI that is run, and all subsequent tests would get a wrong instance of the exporter?

@tjquinno
Copy link
Member

tjquinno commented Jan 17, 2024

I was seeing failures in the pipeline but not locally. Recent telemetry-related PRs have resolved this for me.

Can you please fetch main again and retry?

@tjquinno
Copy link
Member

@tomas-langer Do you still see the problem after the merge of the PR I mentioned earlier?

@tomas-langer
Copy link
Member Author

Works on command line, still fails when I run all the tests in IDE (ie. all tests in package) - this may be that the IDE does not honor the exact configuration in pom file.

@tomas-langer
Copy link
Member Author

When I switch to a fork mode with fork per method, it works in IDE as well (my original workaround)

@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working microprofile telemetry
Projects
Archived in project
Development

No branches or pull requests

2 participants