Skip to content

[Enhancement]: Provide a way to override the JDBC URL parameters used to test whether a database is up #9503

@Yaytay

Description

@Yaytay

Module

MySQL

Proposal

The latest versions of the MySQL JDBC driver are able to make use of OpenTelemetry.
Unfortunately the combination of design decisions by OpenTelemetry, MySQL and Testcontainers means that if a MySQL Testcontainers is started first (in a static, for example) and then the code under test tries to configure OpenTelemetry it will fail because the MySQL driver has already configured OpenTelemetry - it does so when it use by OpenTelemetry for testing whether the database is up.
The MySQL and OpenTelemetry behaviour is reasonable for production deployments, but irritating for tests.

If Testcontainers provided a way to set (or modify) the URL used to connect to MySQL this irritation could be avoided (I could tack on the openTelemetry=DISABLED argument).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions