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

Set up locator services to fix NPE during Maven priming #7227

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

sdedic
Copy link
Member

@sdedic sdedic commented Apr 2, 2024

Maven module attempts to find the included Maven libraries using InstalledFilesLocator which wasn't found, so maven home == null causing NPEs and broken classpath.

The testsuite might work occasionally, as if the Artifact tests, which contain this setup already, or other test that downloads Micronaut libraries to local repository runs BEFORE the completion tests, Maven priming is skipped as all necessary poms are available and the project loads smoothly. If the tests are ordered "incorrectly", maven priming fails and fail the completion tests.

I have moved the setup to a common test base.

@mbien this is the cause of failing tests i https://github.com/apache/netbeans/actions/runs/8444656505/job/23130853755#step:6:1262

@sdedic sdedic added VSCode Extension [ci] enable VSCode Extension tests Micronaut [ci] enable enterprise job labels Apr 2, 2024
@sdedic sdedic added this to the NB22 milestone Apr 2, 2024
@sdedic sdedic requested a review from dbalek April 2, 2024 11:43
@mbien
Copy link
Member

mbien commented Apr 2, 2024

@sdedic thanks for looking into this. I vaguely remember that something similar happened before when either the micronaut or gradle tests were throwing exceptions while still passing and we only noticed it since we tried to debug something else.

I believe I saw somewhere a setting for the test suite to fail tests if it sees an exception (or maybe a certain log level?) in the log, do you think this would make sense here?

@sdedic sdedic merged commit 15393b7 into apache:master Apr 3, 2024
35 checks passed
@sdedic
Copy link
Member Author

sdedic commented Apr 3, 2024

do you think this would make sense here?

It could make sense in more places. But need to be applied very carefully. There are number of "harmless exceptions" from the module system etc, which are now present in the logs. It would be best to work for a while on testing infrastructure to improve suite setups to remove them, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Micronaut [ci] enable enterprise job VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants