You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am currently trying to upgrade from testcontainers version 1.11.4 to 1.12.1
it looks there might be an regression between that versions.
our current code (using v 1.11.4 looks like that). It uses an abstract base class that contains the @testcontainers annotation.
@Testcontainers
abstract class MongoTests {
...
}
class MongoRepositoryIT(
...
) : MongoTests() {
...
}
this setup causes an runtime exception when upgrading to v 1.12.1:
Caused by: org.junit.platform.commons.PreconditionViolationException: Illegal state: required test class is not present in the current ExtensionContext
at org.junit.platform.commons.util.Preconditions.condition(Preconditions.java:281)
at org.junit.platform.commons.util.Preconditions.notNull(Preconditions.java:54)
at org.junit.jupiter.api.extension.ExtensionContext.getRequiredTestClass(ExtensionContext.java:141)
at org.testcontainers.junit.jupiter.TestcontainersExtension.findTestcontainers(TestcontainersExtension.java:62)
at org.testcontainers.junit.jupiter.TestcontainersExtension.evaluateExecutionCondition(TestcontainersExtension.java:55)
at org.junit.jupiter.engine.execution.ConditionEvaluator.evaluate(ConditionEvaluator.java:64)
... 41 more
i can work around that by putting the @testcontainers annotation directly into the concrete test class:
Activity
bsideup commentedon Sep 9, 2019
@abendt-mhp could you please try 1.12.0? I think it may be caused by #1530
bsideup commentedon Sep 9, 2019
@abendt-mhp thanks!
FYI this task is up for grabs if anyone wants to contribute it :) We will eventually take a look, but would also appreciate a fix contributed.
I confirm that
org.testcontainers.junit.jupiter.inheritance.InheritedTeststest fails if we remove@Testcontainersannotation from it.bmuskalla commentedon Sep 9, 2019
I'd be interested taking this on
bsideup commentedon Sep 9, 2019
@bmuskalla thanks! It is yours 👍
I will soft timebox it to 7 days, just so that we can check in one week whether you are still working on it :)
Allow @testcontainers to be inherited from superclass (testcontainers…
bmuskalla commentedon Sep 30, 2019
@bsideup friendly ping :)
bsideup commentedon Oct 1, 2019
@bmuskalla thanks for the ping! 👍 there is one trivial thing (codestyle), happy to merge after 🎉
Nipel-Crumple commentedon Oct 16, 2019
Hello! Could you tell when this PR will be merged approximately?
christian-draeger commentedon Oct 16, 2019
am waiting for a new release that includes the fix as well :)
bsideup commentedon Oct 18, 2019
@Nipel-Crumple there is a PR (#1845) from @bmuskalla that waits a bit of polishing before we merge it
christian-draeger commentedon Oct 22, 2019
is it just because of the star import? i could fix that in case
Allow @testcontainers to be inherited from superclass (testcontainers…
bmuskalla commentedon Oct 24, 2019
Sorry, I totally missed the notification on this one. Pushed a new PR (#2001) for this with the imports fixed (and mssed up the old PR)
bsideup commentedon Oct 24, 2019
@bmuskalla thank you! 👍
Allow @testcontainers to be inherited from superclass (#1843) (#2001)
bsideup commentedon Oct 26, 2019
Fixed by #2001