Skip to content

[Bug]: [MariaDB] getLivenessCheckPortNumbers incorrectly implemented #10359

Description

@AB-xdev

Module

MariaDB

Testcontainers version

1.21.1

Problem at least present since 1.16.0

Using the latest Testcontainers version?

Yes

What happened?

public Set<Integer> getLivenessCheckPortNumbers() {
return Sets.newHashSet(MARIADB_PORT);
}

The MAPPED port is NOT returned, which causes the HostPortWaitStrategy to fail.

Why does this method exists in the first place? I couldn't find why it even exists. The super Method should work just fine.

Additional Information

This is part of a general performance regression in JDBC containers (waitUntilContainerStarted), that I'm currently addressing. I will create some follow up issues too describe the problem/s in more detail soon.

Activity

  1. added a commit that references this issue on Mar 22, 2026
    1138e0d
  2. PreAgile commented on Mar 22, 2026

    @PreAgile
    Contributor

    I'd like to work on this. The fix is straightforward — delegate to super.getLivenessCheckPortNumbers() instead of returning the hardcoded internal port. This matches the fix applied to other containers in PR #5734.

    I've updated both MariaDBContainer implementations and added a test.

    PR: #11577

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions