Skip to content

Commit 2cbb517

Browse files
committed
stress the pool test checking acquiring pooled connections working properly
Signed-off-by: Billy Yuan <billy112487983@gmail.com>
1 parent 30be4a2 commit 2cbb517

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vertx-pg-client/src/test/java/io/vertx/pgclient/PgPoolTestBase.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ protected PgPool createPool(PgConnectOptions connectOptions, int size) {
5555

5656
@Test
5757
public void testPool(TestContext ctx) {
58-
int num = 1000;
58+
int num = 5000;
5959
Async async = ctx.async(num);
6060
PgPool pool = createPool(options, 4);
6161
for (int i = 0;i < num;i++) {
6262
pool.getConnection(ctx.asyncAssertSuccess(conn -> {
63-
conn.query("SELECT id, randomnumber from WORLD WHERE id = 1").execute(ar -> {
63+
conn.query("SELECT id, randomnumber from WORLD").execute(ar -> {
6464
if (ar.succeeded()) {
6565
SqlResult result = ar.result();
66-
ctx.assertEquals(1, result.size());
66+
ctx.assertEquals(10000, result.size());
6767
} else {
6868
ctx.assertEquals("closed", ar.cause().getMessage());
6969
}
@@ -80,10 +80,10 @@ public void testQuery(TestContext ctx) {
8080
Async async = ctx.async(num);
8181
PgPool pool = createPool(options, 4);
8282
for (int i = 0;i < num;i++) {
83-
pool.query("SELECT id, randomnumber from WORLD WHERE id = 1").execute(ar -> {
83+
pool.query("SELECT id, randomnumber from WORLD").execute(ar -> {
8484
if (ar.succeeded()) {
8585
SqlResult result = ar.result();
86-
ctx.assertEquals(1, result.size());
86+
ctx.assertEquals(10000, result.size());
8787
} else {
8888
ctx.assertEquals("closed", ar.cause().getMessage());
8989
}

0 commit comments

Comments
 (0)