Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion embedded-mysql/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* `embedded.mysql.reuseContainer` `(true|false, default is false)`
* `embedded.mysql.encoding` `(default is 'utf8mb4')`
* `embedded.mysql.collation` `(default is 'utf8mb4_unicode_ci')`
* `embedded.mysql.dockerImage` `(default is 'mysql:9.1')`
* `embedded.mysql.dockerImage` `(default is 'mysql:9.5')`
** Image versions on https://hub.docker.com/_/mysql?tab=tags[dockerhub]
* `embedded.mysql.waitTimeoutInSeconds` `(default is 60 seconds)`
* `embedded.mysql.initScriptPath` `(default is null)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public class MySQLProperties extends CommonContainerProperties {
public String getDefaultDockerImage() {
// Please don`t remove this comment.
// renovate: datasource=docker
return "mysql:9.1";
return "mysql:9.5";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class AutoConfiguredDatasourceDependsOnTest {

@Test
public void shouldConnectToMySQL() {
assertThat(jdbcTemplate.queryForObject("select version()", String.class)).startsWith("9.1.");
assertThat(jdbcTemplate.queryForObject("select version()", String.class)).startsWith("9.5.");
}
Comment on lines 37 to 40
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify no tests still assert MySQL version "9.1."
rg -n "startsWith\\(\"9\\.1\\.\"\\)" embedded-mysql/src/test/java || true
rg -n "\"9\\.1\\.\"" embedded-mysql/src/test/java || true
rg -n "mysql:9\\.1" embedded-mysql/src || true

Repository: PlaytikaOSS/testcontainers-spring-boot

Length of output: 506


Update EmbeddedMySQLBootstrapConfigurationTest to assert MySQL 9.5 instead of 9.1.

Line 53 of EmbeddedMySQLBootstrapConfigurationTest.java still asserts startsWith("9.1.") while the default image version has been bumped to 9.5. This will cause the test to fail. Update the assertion to startsWith("9.5.") to match the new default version.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@embedded-mysql/src/test/java/com/playtika/testcontainer/mysql/AutoConfiguredDatasourceDependsOnTest.java`
around lines 37 - 40, Update the failing version assertion in the bootstrap
test: in EmbeddedMySQLBootstrapConfigurationTest (the test method that calls
jdbcTemplate.queryForObject("select version()", String.class), e.g., the test
asserting startsWith("9.1.")), change the expected prefix from "9.1." to "9.5."
so it matches the new default image version; update the literal in that
assertion and re-run the test suite.


@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class EmbeddedMySQLBootstrapConfigurationTest {

@Test
public void shouldConnectToMySQL() {
assertThat(jdbcTemplate.queryForObject("select version()", String.class)).startsWith("9.1.");
assertThat(jdbcTemplate.queryForObject("select version()", String.class)).startsWith("9.5.");
}

@Test
Expand Down
Loading