@@ -298,62 +298,10 @@ describe("72. lobBind2.js", function() {
298
298
299
299
} ) ; // 72.1.4
300
300
301
- it ( "72.1.5 Negative - inconsistent datatypes" , function ( done ) {
302
301
303
- var seq = 5 ;
304
-
305
- async . series ( [
306
- function ( cb ) {
307
- connection . createLob ( oracledb . BLOB , function ( err , lob ) {
308
- should . not . exist ( err ) ;
309
-
310
- lob . on ( "close" , function ( err ) {
311
- should . not . exist ( err ) ;
312
-
313
- connection . commit ( function ( err ) {
314
- should . not . exist ( err ) ;
315
-
316
- return cb ( ) ;
317
- } ) ;
318
- } ) ; // close event
319
-
320
- lob . on ( "error" , function ( err ) {
321
- should . not . exist ( err , "lob.on 'error' event." ) ;
322
- } ) ;
323
-
324
- lob . on ( "finish" , function ( ) {
325
- connection . execute (
326
- "insert into nodb_tab_clob72 (id, content) values (:id, :bindvar)" ,
327
- { id : seq , bindvar : lob } ,
328
- function ( err ) {
329
- should . exist ( err ) ;
330
- ( err . message ) . should . startWith ( "ORA-00932:" ) ;
331
- // ORA-00932: inconsistent datatypes: expected CLOB got BLOB
332
-
333
- lob . close ( function ( err ) {
334
- should . not . exist ( err ) ;
335
- } ) ;
336
- }
337
- ) ;
338
- } ) ; // finish event
339
-
340
- var inStream = fs . createReadStream ( inFileName ) ;
302
+ it ( "72.1.5 DML - UPDATE statement" , function ( done ) {
341
303
342
- inStream . on ( "error" , function ( err ) {
343
- should . not . exist ( err , "inStream.on 'error' event." ) ;
344
- } ) ;
345
-
346
- inStream . pipe ( lob ) ;
347
-
348
- } ) ; // createLob()
349
- }
350
- ] , done ) ;
351
-
352
- } ) ; // 72.1.5
353
-
354
- it ( "72.1.6 DML - UPDATE statement" , function ( done ) {
355
-
356
- var seq = 6 ;
304
+ var seq = 5 ;
357
305
358
306
async . series ( [
359
307
function ( cb ) {
@@ -419,11 +367,11 @@ describe("72. lobBind2.js", function() {
419
367
}
420
368
] , done ) ;
421
369
422
- } ) ; // 72.1.6
370
+ } ) ; // 72.1.5
423
371
424
- it ( "72.1.7 promise test of createLob()" , function ( done ) {
372
+ it ( "72.1.6 promise test of createLob()" , function ( done ) {
425
373
426
- var seq = 7 ;
374
+ var seq = 6 ;
427
375
428
376
if ( oracledb . Promise ) {
429
377
connection . createLob ( oracledb . CLOB )
@@ -474,7 +422,7 @@ describe("72. lobBind2.js", function() {
474
422
return done ( ) ;
475
423
}
476
424
477
- } ) ; // 72.1.7
425
+ } ) ; // 72.1.6
478
426
479
427
} ) ; // 72.1
480
428
@@ -805,85 +753,9 @@ describe("72. lobBind2.js", function() {
805
753
806
754
} ) ; // 72.2.5
807
755
808
- it ( "72.2.6 Negative - createLob() without lob.close()" , function ( done ) {
756
+ it . skip ( "72.2.6 Negative - call lob.close() twice " , function ( done ) {
809
757
810
758
var seq = 6000 ;
811
- var connHandler , lobHandler ;
812
-
813
- async . series ( [
814
- function ( cb ) {
815
- oracledb . getConnection (
816
- dbConfig ,
817
- function ( err , conn ) {
818
- should . not . exist ( err ) ;
819
- connHandler = conn ;
820
-
821
- cb ( ) ;
822
- }
823
- ) ;
824
- } ,
825
- function ( cb ) {
826
- connHandler . createLob ( oracledb . BLOB , function ( err , lob ) {
827
- should . not . exist ( err ) ;
828
-
829
- lobHandler = lob ;
830
-
831
- lob . on ( "error" , function ( err ) {
832
- should . not . exist ( err , "lob.on 'error' event." ) ;
833
- } ) ;
834
-
835
- lob . on ( "finish" , function ( ) {
836
- connHandler . execute (
837
- "insert into nodb_tab_blob72 (id, content) values (:id, :bindvar)" ,
838
- { id : seq , bindvar : lob } ,
839
- function ( err ) {
840
- should . not . exist ( err ) ;
841
-
842
- cb ( )
843
- }
844
- ) ; // execute()
845
- } ) ; // finish event
846
-
847
- var inStream = fs . createReadStream ( jpgFileName ) ;
848
- inStream . on ( "error" , function ( err ) {
849
- should . not . exist ( err , "inStream.on 'error' event." ) ;
850
- } ) ;
851
-
852
- inStream . pipe ( lob ) ;
853
-
854
- } ) ;
855
- } ,
856
- function ( cb ) {
857
- connHandler . close ( function ( err ) {
858
- should . exist ( err ) ;
859
- ( err . message ) . should . startWith ( 'NJS-050:' ) ;
860
- // NJS-050: cannot release connection with active temporary LOBs created by createLob()
861
- cb ( ) ;
862
- } ) ;
863
- } ,
864
- function ( cb ) {
865
- lobHandler . close ( function ( err ) {
866
- should . not . exist ( err ) ;
867
-
868
- } ) ;
869
-
870
- lobHandler . on ( "close" , function ( err ) {
871
- should . not . exist ( err ) ;
872
-
873
- connHandler . commit ( function ( err ) {
874
- should . not . exist ( err ) ;
875
-
876
- return cb ( ) ;
877
- } ) ;
878
- } ) ; // close event
879
- }
880
- ] , done ) ;
881
-
882
- } ) ; // 72.2.6
883
-
884
- it . skip ( "72.2.7 Negative - call lob.close() twice" , function ( done ) {
885
-
886
- var seq = 7000 ;
887
759
888
760
async . series ( [
889
761
function ( cb ) {
@@ -939,11 +811,11 @@ describe("72. lobBind2.js", function() {
939
811
}
940
812
] , done ) ;
941
813
942
- } ) ; // 72.2.7
814
+ } ) ; // 72.2.6
943
815
944
- it . skip ( "72.2.8 Negative - call lob.close() after closing lob" , function ( done ) {
816
+ it . skip ( "72.2.7 Negative - call lob.close() after closing lob" , function ( done ) {
945
817
946
- var seq = 8000 ;
818
+ var seq = 7000 ;
947
819
948
820
async . series ( [
949
821
function ( cb ) {
@@ -999,7 +871,7 @@ describe("72. lobBind2.js", function() {
999
871
}
1000
872
] , done ) ;
1001
873
1002
- } ) ; // 72.2.8
874
+ } ) ; // 72.2.7
1003
875
1004
876
} ) ; // 72.2
1005
877
0 commit comments