Saifulhuq01 commented on code in PR #5566:
URL: https://github.com/apache/fineract/pull/5566#discussion_r2882355988
##########
fineract-command/src/test/java/org/apache/fineract/command/CommandBaseTest.java:
##########
@@ -49,7 +49,7 @@ abstract class CommandBaseTest {
.withNetwork(network).withUsername("root").withPassword("mifos").withDatabaseName("fineract-test");
@Container
- private static final MariaDBContainer<?> MARIADB_CONTAINER = new
MariaDBContainer<>(DockerImageName.parse("mariadb:11.4"))
+ private static final MariaDBContainer<?> MARIADB_CONTAINER = new
MariaDBContainer<>(DockerImageName.parse("mariadb:12.2"))
Review Comment:
@airajena Good effort on the version bump, but changing the version string
broke the Testcontainers initialization.
If you look at the CI logs, the Integration Tests aren't failing due to
schema or collation issues; they are timing out (hanging for 20-27 minutes).
The Java MariaDBContainer class relies on parsing the container's startup logs
to know when it's ready. MariaDB 12 changed its startup log format, causing
Testcontainers' default LogMessageWaitStrategy to wait infinitely.
We need to override the wait strategy in CommandBaseTest.java to use a
standard TCP port wait strategy instead of the default log string matcher:
@Container
private static final MariaDBContainer<?> MARIADB_CONTAINER = new
MariaDBContainer<>(DockerImageName.parse("mariadb:12.2"))
.withNetwork(network).withUsername("root").withPassword("mifos").withDatabaseName("fineract-test")
.waitingFor(Wait.forListeningPort());
Apply that override and the Integration Test shards will stop hanging and go
green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]