-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Replace usages RandomizedTestingTask with built-in Gradle Test #40564
Merged
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
2d9c898
Replace usages RandomizedTestingTask with built-in Gradle Test
mark-vieira 0e9a24c
Workaround for test conventions enforcement
mark-vieira 6536c59
Merge remote-tracking branch 'origin/master' into gradle-test-runner
mark-vieira 8bb56d4
Fix up some merge conflicts
mark-vieira 22d4db8
Use existing mechanism for determining test parallelism
mark-vieira 5437841
Fix overzelous find and replace
mark-vieira a6e23f2
Tweak test event output
mark-vieira fb8e639
Log strait to std streams as it's faster and doesn't introduce extra …
mark-vieira 33a5cd3
Remove unnecessary conditional
mark-vieira 8081e84
Remove unnecessary check
mark-vieira ee88d66
Prefix test log output with std stream identifier
mark-vieira 9e882d8
Fix overzelous find and replace
mark-vieira 7df907d
Fix overzelous find and replace
mark-vieira d63296a
Fix overzelous find and replace
mark-vieira ceecad6
Fix overzelous find and replace
mark-vieira 371dba7
Simplify parallelism logic
mark-vieira 71a7bb2
Disable test tasks when Docker is required but not available
mark-vieira 313fb10
Revert "Remove unnecessary conditional"
mark-vieira d968dd2
Fix issue with tests hanging on Java 8 and lower
mark-vieira 4ad3b25
Convert ErrorReportingTestListener to Java
mark-vieira 38903e7
Ignore problematic system properties
mark-vieira 3590f53
Cap parallelism if we can't determine physical cores available
mark-vieira 3364048
Cap parallelism if we can't determine physical cores available
mark-vieira e773c64
Catch situations where we don't properly apply unit test config
mark-vieira 0ee1a0c
Another lazy gstring system property
mark-vieira e7a504f
Merge remote-tracking branch 'origin/master' into gradle-test-runner
mark-vieira dfc82b9
Simply parallel forks logic
mark-vieira 6b6b5c4
Use gradle `--tests` option in test failure reproduction line
mark-vieira abf29c3
More lazy gstring system properties
mark-vieira 1d74b97
Ditch usages of DefaultGroovyMethods.
mark-vieira 636c067
Ditch extra newlines
mark-vieira 3d19d70
Fix lazy task config
mark-vieira 148a964
Fix integ test system properties when using testclusters plugin
mark-vieira 12f454e
Fix attachment processor tests
mark-vieira c2951ce
Merge remote-tracking branch 'origin/master' into gradle-test-runner
mark-vieira 7801b8f
Merge remote-tracking branch 'origin/master' into gradle-test-runner
mark-vieira 4fe39f5
Merge remote-tracking branch 'origin/master' into gradle-test-runner
mark-vieira a245b22
Don't both setting the test seed on all subprojects
mark-vieira cf9b01b
Improve test failure reporting
mark-vieira 7cc13b2
Merge remote-tracking branch 'origin/master' into gradle-test-runner
mark-vieira 5e0b83c
Merge remote-tracking branch 'origin/master' into gradle-test-runner
mark-vieira 429a506
Remove duplicate code in overridden method
mark-vieira 395a8ed
Mark logger final
mark-vieira 8d67e0d
Declare variables with explicit types
mark-vieira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/BalancersConfiguration.groovy
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/ListenersConfiguration.groovy
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/RandomizedTestingPlugin.groovy
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was a bit forced on us since we couldn't replace
test
, but I don't think we should revert it as it brings clarity.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure all projects having a
test
task that does nothing, in addition to aunitTest
task is particularly clear. I'm not sure we should continue with this funny convention just for historical purposes. We can now also ditch all the goofy logic to disable it, as well as inherit the normal conventions for this task rather than duplicating what thejava
plugin already does for us. Seems unnecessary to me and as you say, this naming was only introduced in the first place due to a technical limitation.I don't think educating folks that
:test
== unit tests is asking a lot.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change wasn't done only as a technical limitations.
I do and always have hated the Gradle
test
task for the ambiguity it brings,and for running
IT
by default, it makes it too easy to mangle tests of different kinds, and it really probably only exists for historical reasons because other build tools had it.Also, the fact that it's being changed in this PR has nothing to do with the goal of the PR and just makes it much harder to read.
My goal is to have specific
unitTest
,integTest
, andinternalClusterTest
tasks with well defined meanings eventually.test
doesn't contribute to this clarity,it's just a catch all which makes it seem ok to add stuff there and move on, whereas
unitTest
makes one think about what tests are being added and what's the best place for them.Gradle is broken in that it enforces a testing conventions that does not scale for anything but projects of trivial size with no convenient way to opt-out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be fair, I think you are just describing Maven surefire and failsafe plugin behaviors. Which themselves are a workaround to a technical limitation which is that Maven doesn't support more than two source sets per module. The proper way to separate tests like this is to model them as separate source sets, not just different
Test
tasks with includes/excludes based on naming conventions. This has lots of other benefits as well.I think we are bikeshedding to some degree. Again, I don't think it's a big deal to convey that
test
runs unit tests, and other tests run the tests as the name describes.I think it's the opposite actually. It doesn't enforce any conventions, which I think is your complaint. I think the "convention" you have issue with is the name of the task it creates. This is really the only thing Gradle is "forcing" on us.