Skip to content

Move the missing-warnings ITs to unit tests and assert the ECJ failure reason - #553

Merged
slachiewicz merged 1 commit into
masterfrom
agent/its-to-unit
Nov 22, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/its-to-unit

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

missing-warnings and missing-warnings-in-process only grepped a build log for one javac warning; JavacCompilerTest.testMissingModuleIsReportedAsWarning asserts the same warning text, line and column (25 for forced javac, 32 for javax.tools) without installing and forking a Maven build. Reverting the column fix in JavacCompiler or the lint category restore in JavaxToolsCompiler fails it. simple-eclipse-compiler-fail passed on any failure; it now asserts the MyClass.java:[23,5] syntax error and that the test sources were never compiled.

…failure reason

The unit test pins the [module] warning and its column for both javac paths (forced javac and javax.tools), which is what the two ITs asserted. simple-eclipse-compiler-fail only checked that the build failed; it now asserts the syntax error in MyClass.java.
@slachiewicz slachiewicz added the maintenance Cleanup, refactoring or other internal change label Nov 22, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 22, 2026 16:58

@slachiewicz slachiewicz left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LGTM. Both missing-warning assertions survive with the exact column (25 for forced javac, 32 for javax.tools), file and line, and the ECJ IT now asserts the syntax error and that the test sources were never compiled instead of accepting any failure.

@slachiewicz
slachiewicz merged commit f147947 into master Nov 22, 2026
28 checks passed
@slachiewicz
slachiewicz deleted the agent/its-to-unit branch November 22, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Cleanup, refactoring or other internal change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant