From 2ea5f91f4ac72f90c956b0e4edb658585fb42cf2 Mon Sep 17 00:00:00 2001 From: Dominic Letz Date: Mon, 9 Jul 2018 11:46:56 +0800 Subject: [PATCH 1/2] Replace poolSize by max in error test --- test/integration/connection-pool/error-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/connection-pool/error-tests.js b/test/integration/connection-pool/error-tests.js index fbc0fded..b7ab986d 100644 --- a/test/integration/connection-pool/error-tests.js +++ b/test/integration/connection-pool/error-tests.js @@ -3,7 +3,7 @@ var helper = require('./test-helper') const pg = helper.pg // first make pool hold 2 clients -pg.defaults.poolSize = 2 +pg.defaults.max = 2 const pool = new pg.Pool() From 28e66ccd4be1f3607b4d6fe457704785b8d6d337 Mon Sep 17 00:00:00 2001 From: Dominic Letz Date: Mon, 9 Jul 2018 14:19:55 +0800 Subject: [PATCH 2/2] Use pool constructor to pass pool size --- test/integration/connection-pool/error-tests.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/integration/connection-pool/error-tests.js b/test/integration/connection-pool/error-tests.js index b7ab986d..17cdcc47 100644 --- a/test/integration/connection-pool/error-tests.js +++ b/test/integration/connection-pool/error-tests.js @@ -2,10 +2,8 @@ var helper = require('./test-helper') const pg = helper.pg -// first make pool hold 2 clients -pg.defaults.max = 2 - -const pool = new pg.Pool() +// make pool hold 2 clients +const pool = new pg.Pool({ max: 2 }) const suite = new helper.Suite() suite.test('connecting to invalid port', (cb) => {