diff --git a/test/pool.js b/test/pool.js index 80e0ddc1..61f5e279 100644 --- a/test/pool.js +++ b/test/pool.js @@ -86,11 +86,11 @@ describe('pool', function() { it('can close multiple times on a pool', async function() { const pool = new pg.Pool({ max: 1 }) - const run = () => - new Promise(async resolve => { - const cursor = new Cursor(text) - const client = await pool.connect() - client.query(cursor) + const run = async () => { + const cursor = new Cursor(text) + const client = await pool.connect() + client.query(cursor) + new Promise(resolve => { cursor.read(25, function(err) { assert.ifError(err) cursor.close(function(err) { @@ -100,6 +100,7 @@ describe('pool', function() { }) }) }) + } await Promise.all([run(), run(), run()]) await pool.end() }) diff --git a/test/transactions.js b/test/transactions.js index 37af28c4..f83cc1d7 100644 --- a/test/transactions.js +++ b/test/transactions.js @@ -28,7 +28,7 @@ describe('transactions', () => { await client.end() }) - it.only('can execute multiple statements in a transaction if no data', async () => { + it('can execute multiple statements in a transaction if no data', async () => { const client = new pg.Client() await client.connect() await client.query('begin')