Tidy tests. Exclude non portable test

This commit is contained in:
Christopher Jones 2016-12-01 22:33:09 +11:00
parent 1236f4b628
commit 936ddb8434
4 changed files with 19 additions and 145 deletions

View File

@ -1075,13 +1075,16 @@ Overview of node-oracledb functional tests
72.1.2 BIND_IN, PL/SQL, a txt file
72.1.3 Negative - invalid type
72.1.4 Negative - invalid value
72.1.5 Negative - inconsistent datatypes
72.1.6 DML - UPDATE statement
72.1.5 DML - UPDATE statement
72.1.6 promise test of createLob()
72.2 BLOB
72.2.1 BIND_IN, DML, a jpg file
72.2.2 BIND_IN, PL/SQL, a jpg file
72.2.3 Negative - inconsistent datatypes
72.2.4 Negative - not providing first parameter
72.2.5 promise test of createLob()
72.2.6 Negative - call lob.close() twice
72.2.7 Negative - call lob.close() after closing lob
73. poolPing.js
73.1 the default value of poolPingInterval is 60

View File

@ -583,7 +583,7 @@ describe('71. lobBind1.js', function() {
var seq = 7;
var inStr = "I love the sunshine today!",
outStr = "A new day has come.";
outStr = "A new day has come.";
var proc = "CREATE OR REPLACE PROCEDURE nodb_proc_clob_inout1 \n" +
" (p_num IN NUMBER, p_inout IN OUT CLOB) \n" +
@ -1346,7 +1346,7 @@ describe('71. lobBind1.js', function() {
outBufID = 70;
var inBuf = assist.createBuffer(10),
outBuf = assist.createBuffer(100);
outBuf = assist.createBuffer(100);
var proc = "CREATE OR REPLACE PROCEDURE nodb_proc_blob_inout1 \n" +
" (p_in IN NUMBER, p_outbufid IN NUMBER, p_inout IN OUT BLOB) \n" +

View File

@ -298,63 +298,11 @@ describe("72. lobBind2.js", function() {
}); // 72.1.4
it("72.1.5 Negative - inconsistent datatypes", function(done) {
it("72.1.5 DML - UPDATE statement", function(done) {
var seq = 5;
async.series([
function(cb) {
connection.createLob(oracledb.BLOB, function(err, lob) {
should.not.exist(err);
lob.on("close", function(err) {
should.not.exist(err);
connection.commit(function(err) {
should.not.exist(err);
return cb();
});
}); // close event
lob.on("error", function(err) {
should.not.exist(err, "lob.on 'error' event.");
});
lob.on("finish", function() {
connection.execute(
"insert into nodb_tab_clob72 (id, content) values (:id, :bindvar)",
{ id: seq, bindvar: lob},
function(err) {
should.exist(err);
(err.message).should.startWith("ORA-00932:");
// ORA-00932: inconsistent datatypes: expected CLOB got BLOB
lob.close(function(err) {
should.not.exist(err);
});
}
);
}); // finish event
var inStream = fs.createReadStream(inFileName);
inStream.on("error", function(err) {
should.not.exist(err, "inStream.on 'error' event.");
});
inStream.pipe(lob);
}); // createLob()
}
], done);
}); // 72.1.5
it("72.1.6 DML - UPDATE statement", function(done) {
var seq = 6;
async.series([
function(cb) {
var proc = "begin \n" +
@ -419,11 +367,11 @@ describe("72. lobBind2.js", function() {
}
], done);
}); // 72.1.6
}); // 72.1.5
it("72.1.7 promise test of createLob()", function(done) {
it("72.1.6 promise test of createLob()", function(done) {
var seq = 7;
var seq = 6;
if (oracledb.Promise) {
connection.createLob(oracledb.CLOB)
@ -474,7 +422,7 @@ describe("72. lobBind2.js", function() {
return done();
}
}); // 72.1.7
}); // 72.1.6
}); // 72.1
@ -805,85 +753,9 @@ describe("72. lobBind2.js", function() {
}); // 72.2.5
it("72.2.6 Negative - createLob() without lob.close()", function(done) {
it.skip("72.2.6 Negative - call lob.close() twice", function(done) {
var seq = 6000;
var connHandler, lobHandler;
async.series([
function(cb) {
oracledb.getConnection(
dbConfig,
function(err, conn) {
should.not.exist(err);
connHandler = conn;
cb();
}
);
},
function(cb) {
connHandler.createLob(oracledb.BLOB, function(err, lob) {
should.not.exist(err);
lobHandler = lob;
lob.on("error", function(err) {
should.not.exist(err, "lob.on 'error' event.");
});
lob.on("finish", function() {
connHandler.execute(
"insert into nodb_tab_blob72 (id, content) values (:id, :bindvar)",
{ id: seq, bindvar: lob },
function(err) {
should.not.exist(err);
cb()
}
); // execute()
}); // finish event
var inStream = fs.createReadStream(jpgFileName);
inStream.on("error", function(err) {
should.not.exist(err, "inStream.on 'error' event.");
});
inStream.pipe(lob);
});
},
function(cb) {
connHandler.close(function(err) {
should.exist(err);
(err.message).should.startWith('NJS-050:');
// NJS-050: cannot release connection with active temporary LOBs created by createLob()
cb();
});
},
function(cb) {
lobHandler.close(function(err) {
should.not.exist(err);
});
lobHandler.on("close", function(err) {
should.not.exist(err);
connHandler.commit(function(err) {
should.not.exist(err);
return cb();
});
}); // close event
}
], done);
}); // 72.2.6
it.skip("72.2.7 Negative - call lob.close() twice", function(done) {
var seq = 7000;
async.series([
function(cb) {
@ -939,11 +811,11 @@ describe("72. lobBind2.js", function() {
}
], done);
}); // 72.2.7
}); // 72.2.6
it.skip("72.2.8 Negative - call lob.close() after closing lob", function(done) {
it.skip("72.2.7 Negative - call lob.close() after closing lob", function(done) {
var seq = 8000;
var seq = 7000;
async.series([
function(cb) {
@ -999,7 +871,7 @@ describe("72. lobBind2.js", function() {
}
], done);
}); // 72.2.8
}); // 72.2.7
}); // 72.2

View File

@ -1667,7 +1667,7 @@ describe('74.lobBindAsStringBuffer.js', function() {
var bigStr_1 = getRandomString(size_1, specialStr);
var bigStr_2 = getRandomString(size_2, specialStr);
var bufferStr_1 = node6plus ? Buffer.from(bigStr_1, "utf-8") : new Buffer(bigStr_1, "utf-8");
var bufferStr_2 = node6plus ? Buffer.from(bigStr_2, "utf-8") : new Buffer(bigStr_2, "utf-8");;
var bufferStr_2 = node6plus ? Buffer.from(bigStr_2, "utf-8") : new Buffer(bigStr_2, "utf-8");
var sequence = 100;
var bindVar = {
i: { val: sequence, type: oracledb.NUMBER, dir: oracledb.BIND_IN },
@ -1799,7 +1799,6 @@ describe('74.lobBindAsStringBuffer.js', function() {
var specialStr = "74.10.2";
var size_1 = 32768;
var sequence = 101;
var size_1 = 32768;
var bindVar = {
i: { val: sequence, type: oracledb.NUMBER, dir: oracledb.BIND_IN },
b1: { type: oracledb.BUFFER, dir: oracledb.BIND_OUT, maxSize: size_1 },