-
Notifications
You must be signed in to change notification settings - Fork 17
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
Unable to build with precommit profile #71
Comments
Current output of running (macOS) mvn -Pmetrics,precommit -Dcheckstyle.skip verify -pl opendj-server-legacy
|
I was able to make it run with a few tweaks. I will create PR soon-ish, but first I need to investigate test failures:
Also it is really slow and I am not sure if there is a reason for it:
And finally it seems that some tests are not made for Windows as there were failures related to backslashes in filesystem paths. |
Running on Linux gives different results:
And for some reason ends with SUCCESS and in much faster time:
|
Seems like a lot of tests are failing due to this sneaky TestNG addition. Kind of wants me to throw TestNG away 😠 Failure example (
|
Example invocation that ends with error even though individual tests are successful: mvn failsafe:integration-test -pl opendj-server-legacy -P precommit -Dit.test=SchemaReplicationTest,StateMachineTest I am not sure how to enable debug logging in tests to actually see what is happening. |
I have invested two more days into this issue. There is no single cause for the broken tests so there is no silver bullet fix that will make precommit profile work. The correct way would be to slowly fix one test after another. Doing something like this is pretty huge task - it might require non-trivial changes (plus working with TestNG alone is pretty developer unfriendly - at least for me). Also quite a lot (I mean a lot) of tests are simply broken and logging ton of errors, but they somehow end with success. So even detecting non working tests is a challenge on its own. Of course fixing one test at a time won't necessarily lead to working precommit profile because those tests are leaking resources and there is a lot of shared state. Running one test class after another might lead to a new error that is not present when each class is run on its own. There are approximately 350 test classes. We can add |
Unit tests in opendj-server-legacy module are only executed with
precommit
maven profile. We don't have this profile in our CI pipeline which is probably mistake.We need to fix unit tests so that they are passing and add this profile to CI pipeline.
The text was updated successfully, but these errors were encountered: