Skip to content
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

[#265]: Validator to properly shutdown, so not to fail further invocations on the same JVM process. #266

Merged
merged 3 commits into from
May 21, 2024

Conversation

Ruhanga
Copy link
Member

@Ruhanga Ruhanga commented May 20, 2024

…t other invocations on the same JVM process.
@Ruhanga Ruhanga requested a review from ibacher May 20, 2024 06:45
Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably safest to add a null check before calling close (so we don't accidentally hide a real issue), but this seems fine.

@@ -53,12 +56,15 @@
import org.testcontainers.containers.MySQLContainer;
import ch.vorburger.exec.ManagedProcessException;

@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this annotation does anything because of how BaseContextSenstitiveTest is defined.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually does, as it forces the recreation of a new Spring application context on the next run. Also BaseContextSenstitiveTest extends AbstractJUnit4SpringContextTests which theoretically means being able to hook into the Spring context life-cycle.

@Ruhanga Ruhanga changed the title [#265]: Validator to properly shutdown, so not to affect other invocations on the same JVM process. [#265]: Validator to properly shutdown, so not to fail further invocations on the same JVM process. May 21, 2024
@Ruhanga Ruhanga merged commit e85cc3a into mekomsolutions:master May 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants