Add toggle switch to unstable test/callTimeout.js

This commit is contained in:
Christopher Jones 2019-11-26 08:23:16 +11:00
parent 9c79c19b6f
commit bed32b213d
2 changed files with 16 additions and 1 deletions

View File

@ -23,6 +23,9 @@
*
* DESCRIPTION
* Test "Connection.callTimeout" property.
* This test requries NODE_ORACLEDB_QA environment variable to be true.
* Because test cases use the hard-code variables TIME_OUT and
* DB_OP_TIME which are not stable in all network situations.
*
*****************************************************************************/
'use strict';
@ -39,7 +42,10 @@ describe('222. callTimeout.js', function() {
let conn;
before(async function() {
isRunnable = await testsUtil.checkPrerequisites();
const isQA = dbconfig.test.NODE_ORACLEDB_QA;
const prep = await testsUtil.checkPrerequisites();
isRunnable = isQA && prep;
if (!isRunnable) {
this.skip();
return;

View File

@ -69,6 +69,15 @@ if (process.env.NODE_ORACLEDB_EXTERNALAUTH) {
}
}
if (process.env.NODE_ORACLEDB_QA) {
let isQA = process.env.NODE_ORACLEDB_QA;
isQA = String(isQA);
isQA = isQA.toLowerCase();
if (isQA == 'true') {
config.test.NODE_ORACLEDB_QA = true;
}
}
if (process.env.NODE_ORACLEDB_DBA_PRIVILEGE) {
var priv = process.env.NODE_ORACLEDB_DBA_PRIVILEGE;
priv = String(priv);