Skip to content

JdbcDatabaseContainer ignores set WaitStrategy #2994

Open
@MarcelHeckel

Description

@MarcelHeckel

The JdbcDatabaseContainer overwirtes the method waitUntilContainerStarted() of GenericContainer but does not call super.waitUntilContainerStarted(). So the WaitStrategy set via waitingFor() is not applied. This is really confusing because you wonder why the set WaitStrategy is not called.

Please add super.waitUntilContainerStarted() at the beginning of waitUntilContainerStarted() in JdbcDatabaseContainer. E.g.:

@Override
protected void waitUntilContainerStarted() {
    super.waitUntilContainerStarted();

    logger().info("Waiting for database connection to become available at {} using query '{}'", getJdbcUrl(), getTestQueryString());

    // Repeatedly try and open a connection to the DB and execute a test query
    ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions