Change test description

This commit is contained in:
Christopher Jones 2017-03-16 15:27:24 +11:00
parent b80081f8a6
commit a625753945
3 changed files with 65 additions and 83 deletions

View File

@ -597,24 +597,20 @@ describe('80.blobDMLBindAsBuffer.js', function() {
var content = node6plus ? Buffer.from(bigStr, "utf-8") : new Buffer(bigStr, "utf-8");
var sql = "INSERT INTO nodb_dml_blob_1 (id, blob) VALUES (:i, :c) RETURNING blob INTO :lobbv";
async.series([
function(cb) {
connection.execute(
sql,
{
i: id,
c: { val: content, type: oracledb.BUFFER, dir: oracledb.BIND_IN },
lobbv: { type: oracledb.BUFFER, dir: oracledb.BIND_OUT, maxSize: contentLength }
},
function(err) {
should.exist(err);
// NJS-028: RAW database type is not supported with DML Returning statements
(err.message).should.startWith('NJS-028:');
cb();
}
);
connection.execute(
sql,
{
i: id,
c: { val: content, type: oracledb.BUFFER, dir: oracledb.BIND_IN },
lobbv: { type: oracledb.BUFFER, dir: oracledb.BIND_OUT, maxSize: contentLength }
},
function(err) {
should.exist(err);
// NJS-028: RAW database type is not supported with DML Returning statements
(err.message).should.startWith('NJS-028:');
done();
}
], done);
);
}); // 80.1.20
it('80.1.21 Negative: RETURNING INTO with autocommit on', function(done) {
@ -622,43 +618,36 @@ describe('80.blobDMLBindAsBuffer.js', function() {
var sql = "INSERT INTO nodb_dml_blob_1 (id, blob) VALUES (:i, EMPTY_BLOB()) RETURNING blob INTO :lobbv";
var inFileName = './test/tree.jpg';
async.series([
function(cb) {
connection.execute(
sql,
{
i: id,
lobbv: { type: oracledb.BLOB, dir: oracledb.BIND_OUT }
},
{ autoCommit: true },
function(err, result) {
should.not.exist(err);
var inStream = fs.createReadStream(inFileName);
var lob = result.outBinds.lobbv[0];
connection.execute(
sql,
{
i: id,
lobbv: { type: oracledb.BLOB, dir: oracledb.BIND_OUT }
},
{ autoCommit: true },
function(err, result) {
should.not.exist(err);
var inStream = fs.createReadStream(inFileName);
var lob = result.outBinds.lobbv[0];
lob.on('error', function(err) {
should.exist(err);
// ORA-22990: LOB locators cannot span transactions
(err.message).should.startWith('ORA-22990:');
});
lob.on('error', function(err) {
should.exist(err);
// ORA-22990: LOB locators cannot span transactions
(err.message).should.startWith('ORA-22990:');
});
inStream.on('error', function(err) {
should.not.exist(err, "inStream.on 'error' event");
});
inStream.on('error', function(err) {
should.not.exist(err, "inStream.on 'error' event");
});
lob.on('close', function(err) {
should.not.exist(err);
connection.commit( function(err) {
should.not.exist(err);
return cb();
});
});
lob.on('close', function(err) {
should.not.exist(err);
done();
});
inStream.pipe(lob); // copies the text to the CLOB
}
);
inStream.pipe(lob); // copies the text to the CLOB
}
], done);
);
}); // 80.1.21
it('80.1.22 works with bind in maxSize smaller than buffer size', function(done) {

View File

@ -611,43 +611,36 @@ describe('79.clobDMLBindAsString.js', function() {
var sql = "INSERT INTO nodb_dml_clob_1 (id, clob) VALUES (:i, EMPTY_CLOB()) RETURNING clob INTO :lobbv";
var inFileName = './test/clobexample.txt';
async.series([
function(cb) {
connection.execute(
sql,
{
i: id,
lobbv: { type: oracledb.CLOB, dir: oracledb.BIND_OUT }
},
{ autoCommit: true },
function(err, result) {
should.not.exist(err);
var inStream = fs.createReadStream(inFileName);
var lob = result.outBinds.lobbv[0];
connection.execute(
sql,
{
i: id,
lobbv: { type: oracledb.CLOB, dir: oracledb.BIND_OUT }
},
{ autoCommit: true },
function(err, result) {
should.not.exist(err);
var inStream = fs.createReadStream(inFileName);
var lob = result.outBinds.lobbv[0];
lob.on('error', function(err) {
should.exist(err);
// ORA-22990: LOB locators cannot span transactions
(err.message).should.startWith('ORA-22990:');
});
lob.on('error', function(err) {
should.exist(err);
// ORA-22990: LOB locators cannot span transactions
(err.message).should.startWith('ORA-22990:');
});
inStream.on('error', function(err) {
should.not.exist(err, "inStream.on 'error' event");
});
inStream.on('error', function(err) {
should.not.exist(err, "inStream.on 'error' event");
});
lob.on('close', function(err) {
should.not.exist(err);
connection.commit( function(err) {
should.not.exist(err);
return cb();
});
});
lob.on('close', function(err) {
should.not.exist(err);
done();
});
inStream.pipe(lob); // copies the text to the CLOB
}
);
inStream.pipe(lob); // copies the text to the CLOB
}
], done);
);
}); // 79.1.21
it('79.1.22 works with bind in maxSize smaller than string length', function(done) {

View File

@ -1362,8 +1362,8 @@ Overview of node-oracledb functional tests
82.1.17 works with setting oracledb.maxRows > actual number of rows in the table
82.1.18 override oracledb.fetchAsString with fetchInfo set to oracledb.DEFAULT
82.1.19 works with connection.queryStream()
82.1.20 works with connection.queryStream() and oracledb.maxRows > actual number of rows in the table (506ms)
82.1.21 works with connection.queryStream() and oracledb.maxRows = actual number of rows in the table (506ms)
82.1.20 works with connection.queryStream() and oracledb.maxRows > actual number of rows in the table
82.1.21 works with connection.queryStream() and oracledb.maxRows = actual number of rows in the table
- 82.1.22 works with connection.queryStream() and oracledb.maxRows < actual number of rows in the table
82.2 fetch CLOB columns by setting oracledb.fetchAsString and outFormat = oracledb.OBJECT
82.2.1 works with NULL value