Skip to content

Improve pgbouncer test#1651

Merged
tsegismont merged 3 commits intoeclipse-vertx:masterfrom
tsegismont:improve-pgbouncer-test
Apr 1, 2026
Merged

Improve pgbouncer test#1651
tsegismont merged 3 commits intoeclipse-vertx:masterfrom
tsegismont:improve-pgbouncer-test

Conversation

@tsegismont
Copy link
Copy Markdown
Member

  • Reuse pgBouncer image across builds
  • Increase PgBouncerTest timeout to 5 minutes
  • Manage connections properly in PgBouncerTest

This will speed up the test when running the test suite locally

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
The test fails intermittently like this on CI:

2026-02-09T10:53:31.9241881Z [ERROR] io.vertx.pgclient.PgBouncerTest.testPreparedBatch -- Time elapsed: 132.0 s <<< ERROR!
2026-02-09T10:53:31.9243012Z java.util.concurrent.TimeoutException
2026-02-09T10:53:31.9243800Z 	at io.vertx.ext.unit.impl.TestContextImpl.lambda$run$1(TestContextImpl.java:79)
2026-02-09T10:53:31.9244627Z 	at java.base/java.lang.Thread.run(Thread.java:1474)

So let's give it a chance to complete in case the build of the container image and the startup take too long.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Setup connections before each test in setUp method.
Close them after each test in tearDown method.
Also, use Vert.x Future#await methods for readability.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont tsegismont merged commit 7fd807e into eclipse-vertx:master Apr 1, 2026
20 checks passed
@tsegismont tsegismont deleted the improve-pgbouncer-test branch April 1, 2026 21:47
tsegismont added a commit that referenced this pull request Apr 1, 2026
* Reuse pgBouncer image across builds

This will speed up the test when running the test suite locally

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

* Increase PgBouncerTest timeout to 5 minutes

The test fails intermittently like this on CI:

2026-02-09T10:53:31.9241881Z [ERROR] io.vertx.pgclient.PgBouncerTest.testPreparedBatch -- Time elapsed: 132.0 s <<< ERROR!
2026-02-09T10:53:31.9243012Z java.util.concurrent.TimeoutException
2026-02-09T10:53:31.9243800Z 	at io.vertx.ext.unit.impl.TestContextImpl.lambda$run$1(TestContextImpl.java:79)
2026-02-09T10:53:31.9244627Z 	at java.base/java.lang.Thread.run(Thread.java:1474)

So let's give it a chance to complete in case the build of the container image and the startup take too long.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

* Manage connections properly in PgBouncerTest

Setup connections before each test in setUp method.
Close them after each test in tearDown method.
Also, use Vert.x Future#await methods for readability.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

---------

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont added a commit that referenced this pull request Apr 1, 2026
* Reuse pgBouncer image across builds

This will speed up the test when running the test suite locally

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

* Increase PgBouncerTest timeout to 5 minutes

The test fails intermittently like this on CI:

2026-02-09T10:53:31.9241881Z [ERROR] io.vertx.pgclient.PgBouncerTest.testPreparedBatch -- Time elapsed: 132.0 s <<< ERROR!
2026-02-09T10:53:31.9243012Z java.util.concurrent.TimeoutException
2026-02-09T10:53:31.9243800Z 	at io.vertx.ext.unit.impl.TestContextImpl.lambda$run$1(TestContextImpl.java:79)
2026-02-09T10:53:31.9244627Z 	at java.base/java.lang.Thread.run(Thread.java:1474)

So let's give it a chance to complete in case the build of the container image and the startup take too long.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

* Manage connections properly in PgBouncerTest

Setup connections before each test in setUp method.
Close them after each test in tearDown method.
Also, use Vert.x Future#await methods for readability.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

---------

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant