@@ -282,7 +282,7 @@ describe('5. externalAuth.js', function() {
282
282
function ( callback ) {
283
283
oracledb . createPool (
284
284
{
285
- externalAuth : true ,
285
+ externalAuth : true ,
286
286
connectString : dbConfig . connectString
287
287
} ,
288
288
function ( err , pool ) {
@@ -419,6 +419,72 @@ describe('5. externalAuth.js', function() {
419
419
420
420
} ) ; // 5.2.4
421
421
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
+
422
488
} ) ; // 5.2
423
489
424
490
} ) ;
0 commit comments