Skip to content

Commit 7142af3

Browse files
committed
Add a new externalAuth test
1 parent 8dfed8c commit 7142af3

File tree

2 files changed

+69
-3
lines changed

2 files changed

+69
-3
lines changed

test/externalAuth.js

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ describe('5. externalAuth.js', function() {
282282
function(callback) {
283283
oracledb.createPool(
284284
{
285-
externalAuth: true,
285+
externalAuth: true,
286286
connectString: dbConfig.connectString
287287
},
288288
function(err, pool) {
@@ -419,6 +419,72 @@ describe('5. externalAuth.js', function() {
419419

420420
}); // 5.2.4
421421

422+
it("5.2.5 poolMin no longer takes effect under externalAuth", function(done) {
423+
424+
oracledb.createPool(
425+
{
426+
externalAuth: true,
427+
connectString: dbConfig.connectString,
428+
poolMin: 5,
429+
poolMax: 20,
430+
poolIncrement: 2
431+
},
432+
function(err, pool) {
433+
(pool.connectionsOpen).should.be.exactly(0);
434+
435+
pool.close(function(err) {
436+
should.not.exist(err);
437+
done();
438+
});
439+
}
440+
);
441+
442+
});
443+
444+
it("5.2.6 poolIncrement no longer takes effect", function(done) {
445+
446+
async.waterfall([
447+
function(callback) {
448+
oracledb.createPool(
449+
{
450+
externalAuth: true,
451+
connectString: dbConfig.connectString,
452+
poolMin: 5,
453+
poolMax: 20,
454+
poolIncrement: 2
455+
},
456+
function(err, pool) {
457+
callback(err, pool);
458+
}
459+
);
460+
},
461+
function(pool, callback) {
462+
pool.getConnection( function(err, conn1) {
463+
(pool.connectionsOpen).should.be.exactly(1);
464+
callback(err, conn1, pool);
465+
});
466+
},
467+
function(conn1, pool, callback) {
468+
pool.getConnection( function(err, conn2) {
469+
(pool.connectionsOpen).should.be.exactly(2);
470+
callback(err, conn1, conn2, pool);
471+
});
472+
}
473+
], function(err, conn1, conn2, pool) {
474+
should.not.exist(err);
475+
conn1.close( function(err) {
476+
should.not.exist(err);
477+
conn2.close(function(err) {
478+
should.not.exist(err);
479+
pool.close(function(err) {
480+
should.not.exist(err);
481+
done();
482+
});
483+
});
484+
});
485+
});
486+
});
487+
422488
}); // 5.2
423489

424490
});

test/properties.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ describe('58. properties.js', function() {
338338
}
339339
})
340340

341-
it.skip('58.2.8 queueRequests', function() {
341+
it('58.2.8 queueRequests', function() {
342342
var t = pool.queueRequests;
343343
t.should.be.a.Boolean;
344344

@@ -350,7 +350,7 @@ describe('58. properties.js', function() {
350350
}
351351
})
352352

353-
it.skip('58.2.9 queueTimeout', function() {
353+
it('58.2.9 queueTimeout', function() {
354354
var t = pool.queueTimeout;
355355
t.should.be.a.Number();
356356

0 commit comments

Comments
 (0)