spring-boot/spring-boot-project/spring-boot-testcontainers
Phillip Webb 6ae113c18a Fix parallel startup of testcontainers
Update `TestcontainersLifecycleBeanPostProcessor` so that containers
can actually be started in parallel.

Prior to this commit, `initializeStartables` would collect beans
and in the process trigger the `postProcessAfterInitialization` method
on each bean. This would see that  `startablesInitialized` was `true`
and call `startableBean.start` directly. The result of this was that
beans were actually started sequentially and when the `start` method
was finally called it had nothing to do.

The updated code uses an enum rather than a boolean so that the
`postProcessAfterInitialization` method no longer attempts to start
beans unless `initializeStartables` has finished.

Fixes gh-38831
2023-12-16 21:57:16 -08:00
..