Skip to content

Conversation

@therepanic
Copy link
Contributor

UnboundIdContainer now implements SmartLifecycle, which allows Spring TestContext to correctly manage its lifecycle when using pause() and resume(). Thanks to this, UnboundIdContainer starts and stops correctly without the need for @DirtiesContext.

Closes: gh-17543

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 17, 2025
Comment on lines +158 to +161
@Override
public int getPhase() {
return 0;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we don't have anything that we can prioritize, I think neutral as 0 will work fine for us.

@rwinch
Copy link
Member

rwinch commented Jul 18, 2025

Thank you for the PR, but this will restart on the same port that was it was initially bound to. This means that we might get a port collision.

I'm going to close this as we are still sorting through the best approach with the Framework team. In the meantime, others can follow with #17543

@rwinch rwinch closed this Jul 18, 2025
@rwinch rwinch self-assigned this Jul 18, 2025
@rwinch rwinch added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UnboundIdContainer fails with TestContext

3 participants