Right now I can use the Wait.forAll-Stategy to wait for multiple conditions to be ready.
This does however check for all conditions in parallel.
For my usecase I need a sequence of things to be checked.
My usecase is a postgres DB that is up for init, then shuts down for the actual DB to come up.
So my Wait strategy is:
- Wait for the log message:
PostgreSQL init process complete; ready for start up.
- Wait for the log message:
database system is ready to accept connections
Wait.forListeningPorts()
I can implement this change, but there are multiple variants on how to do that.
- Alter
Wait.forAll() to accept an optional parameter: Wait.forAll([], "ExecuteInSequence") or Wait.forAll([], "ExecuteInParallel" ) where "ExecuteInParallel" is used by default, to keep compatibility
- Create a new Wait method, like
Wait.forAllInSequence()
What would be your preferred solution?
Right now I can use the
Wait.forAll-Stategy to wait for multiple conditions to be ready.This does however check for all conditions in parallel.
For my usecase I need a sequence of things to be checked.
My usecase is a postgres DB that is up for init, then shuts down for the actual DB to come up.
So my Wait strategy is:
PostgreSQL init process complete; ready for start up.database system is ready to accept connectionsWait.forListeningPorts()I can implement this change, but there are multiple variants on how to do that.
Wait.forAll()to accept an optional parameter:Wait.forAll([], "ExecuteInSequence")orWait.forAll([], "ExecuteInParallel" )where"ExecuteInParallel"is used by default, to keep compatibilityWait.forAllInSequence()What would be your preferred solution?