Skip to content

Commit 347f032

Browse files
committed
Update error assertion for negative LOB tests
1 parent 524381e commit 347f032

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

test/blobDMLBindAsBuffer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,14 @@ describe('82.blobDMLBindAsBuffer.js', function() {
570570
lob.on('error', function(err) {
571571
should.exist(err);
572572
// ORA-22990: LOB locators cannot span transactions
573-
(err.message).should.startWith('ORA-22990:');
573+
// ORA-22920: row containing the LOB value is not locked
574+
var isExpectedError;
575+
if ( (err.message).startsWith('ORA-22990') || (err.message).startsWith('ORA-22920') ) {
576+
isExpectedError = true;
577+
} else {
578+
isExpectedError = false;
579+
}
580+
isExpectedError.should.be.true();
574581
});
575582

576583
inStream.on('error', function(err) {

test/clobDMLBindAsString.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,14 @@ describe('81. clobDMLBindAsString.js', function() {
561561
lob.on('error', function(err) {
562562
should.exist(err);
563563
// ORA-22990: LOB locators cannot span transactions
564-
(err.message).should.startWith('ORA-22990:');
564+
// ORA-22920: row containing the LOB value is not locked
565+
var isExpectedError;
566+
if ( (err.message).startsWith('ORA-22990') || (err.message).startsWith('ORA-22920') ) {
567+
isExpectedError = true;
568+
} else {
569+
isExpectedError = false;
570+
}
571+
isExpectedError.should.be.true();
565572
});
566573

567574
inStream.on('error', function(err) {

0 commit comments

Comments
 (0)