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

Fix TestNg test runner #3813

Merged
merged 3 commits into from
Oct 22, 2024
Merged

Fix TestNg test runner #3813

merged 3 commits into from
Oct 22, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Oct 22, 2024

Fixes #3798, supersedes #3799

Not sure how this ever worked, but it seems like it works now

Converted the example test in #3799 to a unit test.

@lihaoyi
Copy link
Member Author

lihaoyi commented Oct 22, 2024

CC @lefou

lefou
lefou previously approved these changes Oct 22, 2024
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Tested with a reasonable large TestNG test suite spawning 98 test processes.

@lefou lefou dismissed their stale review October 22, 2024 12:21

Doesn't work properly without testForkGrouping now

@lefou
Copy link
Member

lefou commented Oct 22, 2024

@lihaoyi Looks like without custom testForkGrouping, the test suite is now running all tests over and over, probably as often as the count of discovered test classes.

@lihaoyi
Copy link
Member Author

lihaoyi commented Oct 22, 2024

Ah, we must have been running a single task because that task runs all tests within it for some reason

@lihaoyi
Copy link
Member Author

lihaoyi commented Oct 22, 2024

@lefou I pushed an update with a fix and a test case, can try it out if you have time

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good. Local tests seem to work for various fork groups. Thank you for this quick fix!

There is now no longer a single test summary at the end but one for each test class, which is a bit less convenient. Maybe Mill should print a summary, which would look more uniform over the various test frameworks anyways.

@lihaoyi lihaoyi merged commit 298adbe into com-lihaoyi:main Oct 22, 2024
24 checks passed
@lefou lefou added this to the 0.12.0 milestone Oct 22, 2024
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.

TestModule.testForkGrouping is not working for TestNG
2 participants