Skip to content
Snippets Groups Projects
Commit 5fea7198 authored by Vincent Massol's avatar Vincent Massol
Browse files

[Misc] Increase even more the DB timeouts

parent 9b6f435a
No related branches found
No related tags found
No related merge requests found
......@@ -265,14 +265,16 @@ private void startDatabaseContainer(JdbcDatabaseContainer<?> databaseContainer,
TestConfiguration testConfiguration) throws Exception
{
// Note: default startup and connect timeout are at 120s (2mn) but we've noticed cases when it was taking
// longer than that on XWiki and thus our SQL code in grantMySQLPrivileges() is failing because of that.
// Thus we're doubling the timeouts to be safe.
// a lot longer than that and thus our SQL code in grantMySQLPrivileges() is failing because after the timeout
// is reached, TC considers that the DB container is started and thus our SQL code is executed even though the
// DB is not started, and this, it fails. We've increased the timeouts to 15mn which is a lot and we might need
// to debug to find out why MySQL is taking so long to start in these cases.
databaseContainer
.withExposedPorts(port)
.withNetwork(Network.SHARED)
.withNetworkAliases("xwikidb")
.withStartupTimeoutSeconds(240)
.withConnectTimeoutSeconds(240);
.withStartupTimeoutSeconds(900)
.withConnectTimeoutSeconds(900);
start(databaseContainer, testConfiguration);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment