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.
testcontainers-java reworked lifecycle of the containers a bit. This pull request is to support these changes.
TestLifecycleAware
trait introduced. It's a copy of java's interface, but with scala'sOption
type. Users of the library can use it when they want to do something with the container before or after the test. Personally, I'm against this feature at all, but I didn't convince the core java team that this feature is redundant. So, we have to support this. Also, I could just reuse java's interface, but I don't think that it's a good idea. Scala's hierarchy is completely separate from the java's, and it would be very unnatural for the scala users to work with the java's Optional.Container
now implementsStartable
java interface withstart
andstop
methods.. I didn't copy this interface, because it's absolutely minimal and usable from the scala side.ForEachTestContainer
andForAllTestContainer
now uses new lifecycle methods.volatile
.ForAllTestContainer
now supportsafterTest
/beforeTest
.SeleniumContainer
now implements TestLifecycleAware.MultipleContainers
andLazyContainer
are implementsTestLifecycleAware
too, because they could contain containers withTestLifecycleAware
.finished
,succeeded
,starting
,failed
methods, are marked as deprecated.