Skip to content

Commit 74a75e9

Browse files
committed
Prefer forcing pools closed immediately
1 parent 1f3f2d2 commit 74a75e9

17 files changed

+136
-137
lines changed

test/changePassword.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ describe('161. changePassword.js', function() {
125125
// Still able to get connections
126126
conn = await pool.getConnection();
127127
await conn.close();
128-
await pool.close();
128+
await pool.close(0);
129129
// verify with old password
130130
pool = await oracledb.createPool(credential);
131131

@@ -134,7 +134,7 @@ describe('161. changePassword.js', function() {
134134
/ORA-01017:/
135135
);
136136

137-
await pool.close();
137+
await pool.close(0);
138138

139139
// verify with new password
140140
credential = {
@@ -145,7 +145,7 @@ describe('161. changePassword.js', function() {
145145
pool = await oracledb.createPool(credential);
146146
conn = await pool.getConnection();
147147
await conn.close();
148-
await pool.close();
148+
await pool.close(0);
149149
}); // 161.2
150150

151151
it('161.3 DBA changes password', async function() {

test/connHealthy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('261. connHealthy.js', function() {
6969
await conn.close();
7070
isHealthy = conn.isHealthy();
7171
assert.strictEqual(isHealthy, false);
72-
await pool.close();
72+
await pool.close(0);
7373
});
7474

7575
});

test/connection.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ describe('1. connection.js', function() {
359359
const pool = await oracledb.createPool(credential);
360360
const conn = await pool.getConnection();
361361
await conn.release();
362-
await pool.close();
362+
await pool.close(0);
363363
});
364364

365365
}); // 1.7
@@ -526,4 +526,3 @@ describe('1. connection.js', function() {
526526
});
527527
}); //1.15
528528
});
529-

test/connectionClass.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2019, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2019, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -50,7 +50,7 @@ describe('221. connectionClass.js', () => {
5050
assert.strictEqual(result.rows[0][0], 5);
5151

5252
await conn.close();
53-
await pool.close();
53+
await pool.close(0);
5454
}); // 221.1
5555

5656
it('221.2 set the property when using a standalone connection', async () => {

test/driverName.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ describe('69. driverName.js', function() {
6060
assert.strictEqual(result.rows[0][0], "node-ora");
6161
}
6262
await connection.close();
63-
await pool.close();
63+
await pool.close(0);
6464
});
6565
});

test/externalProxyAuth.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2021, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2021, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -211,7 +211,7 @@ describe('180. externalProxyAuth.js', function() {
211211
}
212212
if (pool) {
213213
try {
214-
await pool.close();
214+
await pool.close(0);
215215
} catch (err) {
216216
should.not.exist(err);
217217
}
@@ -245,7 +245,7 @@ describe('180. externalProxyAuth.js', function() {
245245
}
246246
if (pool) {
247247
try {
248-
await pool.close();
248+
await pool.close(0);
249249
} catch (err) {
250250
should.not.exist(err);
251251
}
@@ -279,7 +279,7 @@ describe('180. externalProxyAuth.js', function() {
279279
}
280280
if (pool) {
281281
try {
282-
await pool.close();
282+
await pool.close(0);
283283
} catch (err) {
284284
should.not.exist(err);
285285
}
@@ -313,7 +313,7 @@ describe('180. externalProxyAuth.js', function() {
313313
}
314314
if (pool) {
315315
try {
316-
await pool.close();
316+
await pool.close(0);
317317
} catch (err) {
318318
should.not.exist(err);
319319
}
@@ -350,7 +350,7 @@ describe('180. externalProxyAuth.js', function() {
350350
}
351351
if (pool) {
352352
try {
353-
await pool.close();
353+
await pool.close(0);
354354
} catch (err) {
355355
should.not.exist(err);
356356
}
@@ -388,7 +388,7 @@ describe('180. externalProxyAuth.js', function() {
388388
}
389389
if (pool) {
390390
try {
391-
await pool.close();
391+
await pool.close(0);
392392
} catch (err) {
393393
should.not.exist(err);
394394
}
@@ -426,7 +426,7 @@ describe('180. externalProxyAuth.js', function() {
426426
}
427427
if (pool) {
428428
try {
429-
await pool.close();
429+
await pool.close(0);
430430
} catch (err) {
431431
should.not.exist(err);
432432
}
@@ -460,7 +460,7 @@ describe('180. externalProxyAuth.js', function() {
460460
}
461461
if (pool) {
462462
try {
463-
await pool.close();
463+
await pool.close(0);
464464
} catch (err) {
465465
should.not.exist(err);
466466
}
@@ -497,7 +497,7 @@ describe('180. externalProxyAuth.js', function() {
497497
}
498498
if (pool) {
499499
try {
500-
await pool.close();
500+
await pool.close(0);
501501
} catch (err) {
502502
should.not.exist(err);
503503
}

test/instanceof1.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('45. instanceof1.js', function() {
4646
};
4747
const pool = await oracledb.createPool(config);
4848
assert(pool instanceof oracledb.Pool);
49-
await pool.close();
49+
await pool.close(0);
5050
});
5151

5252
it('45.3 instanceof works for connection instances', async function() {

0 commit comments

Comments
 (0)