-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
JUnit rule for flaky test retry #1680
Conversation
test-support/src/main/java/org/testcontainers/testsupport/Flaky.java
Outdated
Show resolved
Hide resolved
test-support/src/main/java/org/testcontainers/testsupport/FlakyTestJUnit4RetryRule.java
Outdated
Show resolved
Hide resolved
test-support/src/main/java/org/testcontainers/testsupport/FlakyTestJUnit4RetryRule.java
Outdated
Show resolved
Hide resolved
Un WIP'd, please could you have a look too @kiview? |
@@ -35,9 +33,28 @@ subprojects { | |||
} | |||
} | |||
|
|||
project.tasks.sourceJar.from(delombok) | |||
// specific modules should be excluded from publication |
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 is a way to disable publication of these modules. Not sure if it's the best.
I've tested this manually using ./gradlew -x test publishToMavenLocal
and verified that these three modules are no longer created under ~/.m2/repository/org/testcontainers
We should obviously be cautious to check the same applies to the bintray publication as well.
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.
AFAIK artifacts.removeAll()
will do the trick (no publishing if there are no artifacts to publish)
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 honestly can't figure out how to make this work - my Gradle fu is clearly not strong enough. Unless there's something wrong with my approach I'd prefer to keep with something that I can understand!
core/src/test/java/org/testcontainers/junit/GenericContainerRuleTest.java
Outdated
Show resolved
Hide resolved
* format (e.g. {@code 2020-12-03}). Now + 3 months is suggested. Once this date has passed, retries will no longer | ||
* be applied. | ||
*/ | ||
String reviewDate(); |
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.
WDYT about letting them fail explicitly instead of not retrying?
Which would mean, we either have to remove the annotation or prolong it?
Or does this create too much maintenance? I think the maintenance should be the same, just without explicitly failing, we will miss the flaky tests for some time.
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 suspect it could end up being a PITA for contributors, to be honest!
Fixes #1629