Skip to content

Support for waiting sequentically #997

@nidomiro

Description

@nidomiro

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:

  1. Wait for the log message: PostgreSQL init process complete; ready for start up.
  2. Wait for the log message: database system is ready to accept connections
  3. Wait.forListeningPorts()

I can implement this change, but there are multiple variants on how to do that.

  1. Alter Wait.forAll() to accept an optional parameter: Wait.forAll([], "ExecuteInSequence") or Wait.forAll([], "ExecuteInParallel" ) where "ExecuteInParallel" is used by default, to keep compatibility
  2. Create a new Wait method, like Wait.forAllInSequence()

What would be your preferred solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions