-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding errorprone support and fix chained dataloader bug #4002
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
Conversation
Test Results 318 files 318 suites 2m 50s ⏱️ Results for commit a05a319. ♻️ This comment has been updated with latest results. |
8d3e1bd
to
1d5d4f6
Compare
} | ||
test.dependsOn testWithJava17 | ||
test.dependsOn testWithJava11 | ||
|
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.
Nice - I am guessing this runs on both JDKs
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.
we specify inside the task different toolchains ...so we run the tests with different Java versions
@@ -79,11 +80,10 @@ class Issue1178DataLoaderDispatchTest extends Specification { | |||
.build() | |||
|
|||
then: "execution shouldn't error" | |||
for (int i = 0; i < NUM_OF_REPS; i++) { |
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.
why did this change ????
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.
Because I found that the @RepeatUntilFailure
is better way to achieve the same goal.
for (ResultPathWithDataLoader resultPathWithDataLoader : callStack.allResultPathWithDataLoader) { | ||
// we need to copy the list because the callStack.allResultPathWithDataLoader can be modified concurrently | ||
// while iterating over it | ||
ArrayList<ResultPathWithDataLoader> resultPathWithDataLoaders = new ArrayList<>(callStack.allResultPathWithDataLoader); |
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.
@bbakerman fyi: this is a fix for a bug I found by running the tests on Java 21. This problem didn't show up earlier.
@@ -46,7 +47,7 @@ class ExecutableDefinitionsTest extends Specification { | |||
} | |||
|
|||
def 'Executable Definitions with type definition'() { | |||
def query = """ | |||
def query = StringGroovyMethods.stripIndent(""" |
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.
Java 15 introduced a stripIndent
method which is used by default now. In order to keep the tests the same we now specify the groovy method explicitly
@@ -17,15 +17,18 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v4 | |||
- uses: gradle/actions/wrapper-validation@v4 | |||
- name: Set up JDK 11 | |||
- name: Set up JDK 21 |
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.
We should run gradle on the latest version by default.
Nullaway
This PR adds errorprone / nullaway / jspecify support.
It changes the tests to run on 11/17/21 (and not just in 11 as before).
We compile and build with Java 21 now, but release for 11.
Gradle itself also runs now with 21 in the github actions.
A new custom annotation
@Contract
is introduced to enable custom contracts for example for the Assert class.We fix up a few places that were found by nullaway.
One specific PropertyDataFetcher test is failing for 17/21, so it is now ignored when executed on a JVM > 11. As this is not a new problem we decided to ignore it in this case and deal with it later.
DataLoader bugfix
It also fixes a bug for the new chained dataloader logic that showed up only when running the tests with Java 21/