@@ -239,61 +239,6 @@ describe('2. pool.js', function() {
239
239
) ;
240
240
} ) ;
241
241
242
- it . skip ( '2.3.4 poolMax limits the pool capacity' , function ( done ) {
243
- oracledb . createPool (
244
- {
245
- user : dbConfig . user ,
246
- password : dbConfig . password ,
247
- connectString : dbConfig . connectString ,
248
- poolMin : 1 ,
249
- poolMax : 2 ,
250
- poolIncrement : 1 ,
251
- poolTimeout : 28 ,
252
- stmtCacheSize : 23 ,
253
- queueRequests : false
254
- } ,
255
- function ( err , pool ) {
256
- should . not . exist ( err ) ;
257
- pool . should . be . ok ( ) ;
258
- pool . connectionsInUse . should . be . exactly ( 0 ) ;
259
-
260
- pool . getConnection ( function ( err , conn1 ) {
261
- should . not . exist ( err ) ;
262
- conn1 . should . be . ok ( ) ;
263
- pool . connectionsOpen . should . be . exactly ( 1 ) ;
264
- pool . connectionsInUse . should . be . exactly ( 1 ) ;
265
-
266
- pool . getConnection ( function ( err , conn2 ) {
267
- should . not . exist ( err ) ;
268
- conn2 . should . be . ok ( ) ;
269
- pool . connectionsOpen . should . be . exactly ( 2 ) ;
270
- pool . connectionsInUse . should . be . exactly ( 2 ) ;
271
-
272
- // Error occurs
273
- pool . getConnection ( function ( err , conn3 ) {
274
- should . exist ( err ) ;
275
- ( err . message ) . should . startWith ( 'ORA-24418:' ) ;
276
-
277
- should . not . exist ( conn3 ) ;
278
-
279
- conn2 . release ( function ( err ) {
280
- should . not . exist ( err ) ;
281
- conn1 . release ( function ( err ) {
282
- should . not . exist ( err ) ;
283
- pool . terminate ( function ( err ) {
284
- should . not . exist ( err ) ;
285
- done ( ) ;
286
- } ) ;
287
- } ) ;
288
- } ) ;
289
- } ) ;
290
- } ) ;
291
- } ) ;
292
-
293
- }
294
- ) ;
295
- } ) ;
296
-
297
242
} ) ; // 2.3
298
243
299
244
describe ( '2.4 poolIncrement' , function ( ) {
@@ -594,7 +539,7 @@ describe('2. pool.js', function() {
594
539
595
540
} ) ;
596
541
597
- describe ( '2.8 connection request queue (basic functionality) ' , function ( ) {
542
+ describe ( '2.8 connection queueing ' , function ( ) {
598
543
599
544
function getBlockingSql ( secondsToBlock ) {
600
545
var blockingSql = '' +
@@ -613,64 +558,7 @@ describe('2. pool.js', function() {
613
558
return blockingSql ;
614
559
}
615
560
616
- it . skip ( '2.8.1 generates ORA-24418 when calling getConnection if queueing is disabled' , function ( done ) {
617
- oracledb . createPool (
618
- {
619
- user : dbConfig . user ,
620
- password : dbConfig . password ,
621
- connectString : dbConfig . connectString ,
622
- poolMin : 0 ,
623
- poolMax : 1 ,
624
- poolIncrement : 1 ,
625
- poolTimeout : 1 ,
626
- queueRequests : false
627
- } ,
628
- function ( err , pool ) {
629
- should . not . exist ( err ) ;
630
-
631
- async . parallel (
632
- [
633
- function ( cb ) {
634
- pool . getConnection ( function ( err , conn ) {
635
- should . not . exist ( err ) ;
636
-
637
- conn . execute ( getBlockingSql ( 3 ) , function ( err ) {
638
- should . not . exist ( err ) ;
639
-
640
- conn . release ( function ( err ) {
641
- should . not . exist ( err ) ;
642
- cb ( ) ;
643
- } ) ;
644
- } ) ;
645
- } ) ;
646
- } ,
647
- function ( cb ) {
648
- //using setTimeout to help ensure this gets to the db last
649
- setTimeout ( function ( ) {
650
- pool . getConnection ( function ( err , conn ) {
651
- should . exist ( err ) ;
652
- // ORA-24418: Cannot open further sessions
653
- ( err . message ) . should . startWith ( 'ORA-24418:' ) ;
654
- should . not . exist ( conn ) ;
655
- cb ( ) ;
656
- } ) ;
657
- } , 200 ) ;
658
- }
659
- ] ,
660
- function ( err ) {
661
- should . not . exist ( err ) ;
662
-
663
- pool . terminate ( function ( err ) {
664
- should . not . exist ( err ) ;
665
- done ( ) ;
666
- } ) ;
667
- }
668
- ) ;
669
- }
670
- ) ;
671
- } ) ;
672
-
673
- it ( '2.8.2 does not generate ORA-24418 when calling getConnection' , function ( done ) {
561
+ it ( '2.8.1 basic case' , function ( done ) {
674
562
oracledb . createPool (
675
563
{
676
564
user : dbConfig . user ,
@@ -701,7 +589,7 @@ describe('2. pool.js', function() {
701
589
} ) ;
702
590
} ,
703
591
function ( cb ) {
704
- //using setTimeout to help ensure this gets to the db last
592
+ //using setTimeout to help ensure this connection requests reaches DB later
705
593
setTimeout ( function ( ) {
706
594
pool . getConnection ( function ( err , conn ) {
707
595
should . not . exist ( err ) ;
@@ -727,7 +615,7 @@ describe('2. pool.js', function() {
727
615
) ;
728
616
} ) ;
729
617
730
- it ( '2.8.3 generates NJS-040 if request is queued and queueTimeout expires' , function ( done ) {
618
+ it ( '2.8.2 generates NJS-040 if request is queued and queueTimeout expires' , function ( done ) {
731
619
oracledb . createPool (
732
620
{
733
621
user : dbConfig . user ,
@@ -783,7 +671,7 @@ describe('2. pool.js', function() {
783
671
) ;
784
672
} ) ;
785
673
786
- it ( '2.8.4 does not generate NJS-040 if request is queued for less time than queueTimeout' , function ( done ) {
674
+ it ( '2.8.3 does not generate NJS-040 if request is queued for less time than queueTimeout' , function ( done ) {
787
675
oracledb . createPool (
788
676
{
789
677
user : dbConfig . user ,
@@ -841,8 +729,8 @@ describe('2. pool.js', function() {
841
729
} ) ;
842
730
} ) ;
843
731
844
- describe ( '2.9 connection request queue ( _enableStats & _logStats functionality) ' , function ( ) {
845
- it ( '2.9.1 does not works after the pool has been terminated' , function ( done ) {
732
+ describe ( '2.9 _enableStats & _logStats functionality' , function ( ) {
733
+ it ( '2.9.1 does not work after the pool has been terminated' , function ( done ) {
846
734
oracledb . createPool (
847
735
{
848
736
user : dbConfig . user ,
0 commit comments