-
Notifications
You must be signed in to change notification settings - Fork 4
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
Reuse @TestContainers and @Container #11
Comments
Those annotations will not work in all cases. For example, in WildFly there is the ability to implement a |
Testcontainers have wait strategies, can the Wildfly/Glassfishs test deployment step wait for testconainters be ready for deployment? |
@hantsy Yes, that should be possible AFAIK. If you have an example of what it would look like without Arquillian, I can confirm. What should happen though is the Testcontainer is started before the class. The class should then be created and the deployment done. Once the class is complete, the Testcontainer should stop. |
I tried this way in an example before: https://github.com/hantsy/arquillian-testcontainers-example/blob/autodeployment/src/test/java/com/example/it/GreetingResourceTest.java#L51 The |
That could be done by extending the testcontainer. Note that the |
I found there is a new annotation
@TestContainer
added to control testcontainer Container. https://github.com/arquillian/arquillian-testcontainers/blob/main/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java#L28The basic support of Spring Boot testcontiners just adds a
@ServiceConnection
to the container declarations to setup the connection properties automatically.If possible, reuse the testcontainers existing
@Testcontainers
and@Container
to controll the container lifecycle, and ensure Arquillian sets up the application server adapter's properties after the successful waiting strategy. Then perform the deployment that is defined by@Deployment
.The text was updated successfully, but these errors were encountered: