File tree Expand file tree Collapse file tree 3 files changed +42
-3
lines changed Expand file tree Collapse file tree 3 files changed +42
-3
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ messages.set(ERR_UNSUPPORTED_VERIFIER_TYPE, // NJS-116
355
355
messages . set ( ERR_INVALID_PRIVATE_KEY , // NJS-117
356
356
'invalid private key. Headers and footers are not allowed' ) ;
357
357
messages . set ( ERR_THIN_CONNECTION_ALREADY_CREATED , // NJS-118
358
- 'node-oracledb Thick mode cannot be used because a Thin mode connection has already been created' ) ;
358
+ 'node-oracledb Thick mode cannot be enabled because a Thin mode connection has already been created' ) ;
359
359
messages . set ( ERR_UNSUPPORTED_CONVERSION , // NJS-119
360
360
'conversion from type %s to type %s is not supported' ) ;
361
361
messages . set ( ERR_FETCH_TYPE_HANDLER_RETURN_VALUE , // NJS-120
Original file line number Diff line number Diff line change @@ -373,10 +373,10 @@ async function _verifyOptions(options, inCreatePool) {
373
373
outOptions . queueTimeout = options . queueTimeout ;
374
374
}
375
375
376
- // queueMax must be an integer >= 0
376
+ // queueMax must be an integer >= -1
377
377
if ( options . queueMax !== undefined ) {
378
378
errors . assertParamPropValue ( Number . isInteger ( options . queueMax ) &&
379
- options . queueMax >= 0 , 1 , "queueMax" ) ;
379
+ options . queueMax >= - 1 , 1 , "queueMax" ) ;
380
380
outOptions . queueMax = options . queueMax ;
381
381
}
382
382
Original file line number Diff line number Diff line change @@ -502,6 +502,45 @@ describe('2. pool.js', function() {
502
502
await pool . close ( 0 ) ;
503
503
} ) ;
504
504
505
+ it ( '2.8.6 queueMax range check, queueMax -1' , async function ( ) {
506
+ const config = { ...dbConfig ,
507
+ poolMin : 1 ,
508
+ poolMax : 1 ,
509
+ poolIncrement : 0 ,
510
+ queueMax : - 1
511
+ } ;
512
+ const pool = await oracledb . createPool ( config ) ;
513
+ const conn = await pool . getConnection ( ) ;
514
+ await conn . close ( ) ;
515
+ await pool . close ( 0 ) ;
516
+ } ) ;
517
+
518
+ it ( '2.8.7 queueMax range check, queueMax -2 out of range' , async function ( ) {
519
+ const config = { ...dbConfig ,
520
+ poolMin : 1 ,
521
+ poolMax : 1 ,
522
+ poolIncrement : 0 ,
523
+ queueMax : - 2
524
+ } ;
525
+ await assert . rejects (
526
+ async ( ) => await oracledb . createPool ( config ) ,
527
+ / N J S - 0 0 7 : /
528
+ ) ;
529
+ } ) ;
530
+
531
+ it ( '2.8.8 queueMax range check, queueMax -0.5 not an integer' , async function ( ) {
532
+ const config = { ...dbConfig ,
533
+ poolMin : 1 ,
534
+ poolMax : 1 ,
535
+ poolIncrement : 0 ,
536
+ queueMax : - 1.5
537
+ } ;
538
+ await assert . rejects (
539
+ async ( ) => await oracledb . createPool ( config ) ,
540
+ / N J S - 0 0 7 : /
541
+ ) ;
542
+ } ) ;
543
+
505
544
} ) ;
506
545
507
546
describe ( '2.9 _enableStats & _logStats functionality' , function ( ) {
You can’t perform that action at this time.
0 commit comments