Skip to content

java.io.IOException: Gave up waiting for server to start after 10000ms #97

@lwitzani

Description

@lwitzani

Hi,

i have a similar issue as in zonkyio/embedded-database-spring-test#1

I am currently in the process of updating the postgres related dependencies in our project.
Before we had

<groupId>io.zonky.test</groupId>
<artifactId>embedded-postgres</artifactId>
<version>1.2.7</version>

<groupId>io.zonky.test.postgres</groupId>
<artifactId>embedded-postgres-binaries-bom</artifactId>
<version>13.2.0</version>

and i tried to update to

<groupId>io.zonky.test</groupId>
<artifactId>embedded-postgres</artifactId>
<version>2.0.1</version>

<groupId>io.zonky.test.postgres</groupId>
<artifactId>embedded-postgres-binaries-bom</artifactId>
<version>14.5.0</version>

Locally all tests work when starting them via intellij and also directly via mvn test.
The problem now occurs on our build system.
We use TeamCity together with Windows Agents to execute the builds.
The build step is basically mvn clean deploy.
With the old configuration, everything worked fine but with the new one the builds have failed tests.
Unfortunately, the only log output for failed tests is

[09:51:16][SystemModelServiceTest] java.io.IOException: Gave up waiting for server to start after 10000ms
[09:51:16][SystemModelServiceTest] java.io.IOException: Gave up waiting for server to start after 10000ms
Caused by: java.sql.SQLException: connect failed
Caused by: java.net.SocketTimeoutException: connect timed out

and the strange part is that not all tests fail like this.
In fact, 35 fail and 91 pass.
So it seems that it should actually work, otherwise all tests would fail.

Do you have any idea what the problem could be in this case?

As an additional note, i have to mention that i modified the used embedded-postgres-binaries-windows-amd64-14.5.0.jar to include a postgres environment that has the postgis extension installed.
It contains the original environment + manually installed postgis extension files.
This is the case for both versions 13.2.0 and 14.5.0 and it worked perfectly on 13.2.0. I don't think that this is the problem.

Thanks so much!
Cheers,
Lukas

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions