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

SONARJAVA-5303 Replace logTester by ThreadLocalLogTester #5010

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

romainbrenguier
Copy link
Contributor

@romainbrenguier romainbrenguier commented Feb 7, 2025

SONARJAVA-5303

With this change we should avoid the togs being polluted by messages coming from different threads.

Some test check the logs based on the raw messages, so this is needed from the interface.
assertThat(logs).hasSize(1);
assertThat(logs.get(0)).isEqualTo(logMessage);

sonarComponents.fileCanBeSkipped(inputFile);
logs = filterOutAnalysisProgressLogMessages(logTester.getLogs(Level.INFO));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.sonar.java.TestUtils#filterOutAnalysisProgressLogMessages seems to not be used anymore, we should delete the method definition.

With this change we should avoid the logs being polluted by messages
coming from different threads.
@romainbrenguier romainbrenguier force-pushed the romain/flaky-windows-qa-test branch from 54be294 to 7aab386 Compare February 7, 2025 14:42
Copy link

sonarqube-next bot commented Feb 7, 2025

@alban-auzeill alban-auzeill merged commit 7a2004b into master Feb 7, 2025
16 of 17 checks passed
@alban-auzeill alban-auzeill deleted the romain/flaky-windows-qa-test branch February 7, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants