-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Labels
in: ldapAn issue in spring-security-ldapAn issue in spring-security-ldaptype: bugA general bugA general bug
Milestone
Description
This appears to be related to
- spring-projects/spring-framework@dbe89ab
- Introduce
ConfigurableApplicationContext.restart()
method spring-framework#35171 - Pause unused application contexts in the TestContext framework spring-framework#35168
Adding @DirtiesContext
works around the issue
Note that part of the problem is a little challenging when using an ephemeral port. We cannot just start and restart the context because:
- If we allocate a new port then Beans that used the previous port information will be stale
- If we preserve the same port, the port may have been taken in the meantime
I spoke to @jhoeller and @sbrannen offline and it was suggested that we might be able to do something like this:
public void stop() {
if (port == 0 && context != null && !context.isClosed()) return;
}
Metadata
Metadata
Assignees
Labels
in: ldapAn issue in spring-security-ldapAn issue in spring-security-ldaptype: bugA general bugA general bug