Skip to content

Commit bed32b2

Browse files
committed
Add toggle switch to unstable test/callTimeout.js
1 parent 9c79c19 commit bed32b2

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

test/callTimeout.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
*
2424
* DESCRIPTION
2525
* Test "Connection.callTimeout" property.
26+
* This test requries NODE_ORACLEDB_QA environment variable to be true.
27+
* Because test cases use the hard-code variables TIME_OUT and
28+
* DB_OP_TIME which are not stable in all network situations.
2629
*
2730
*****************************************************************************/
2831
'use strict';
@@ -39,7 +42,10 @@ describe('222. callTimeout.js', function() {
3942
let conn;
4043

4144
before(async function() {
42-
isRunnable = await testsUtil.checkPrerequisites();
45+
46+
const isQA = dbconfig.test.NODE_ORACLEDB_QA;
47+
const prep = await testsUtil.checkPrerequisites();
48+
isRunnable = isQA && prep;
4349
if (!isRunnable) {
4450
this.skip();
4551
return;

test/dbconfig.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ if (process.env.NODE_ORACLEDB_EXTERNALAUTH) {
6969
}
7070
}
7171

72+
if (process.env.NODE_ORACLEDB_QA) {
73+
let isQA = process.env.NODE_ORACLEDB_QA;
74+
isQA = String(isQA);
75+
isQA = isQA.toLowerCase();
76+
if (isQA == 'true') {
77+
config.test.NODE_ORACLEDB_QA = true;
78+
}
79+
}
80+
7281
if (process.env.NODE_ORACLEDB_DBA_PRIVILEGE) {
7382
var priv = process.env.NODE_ORACLEDB_DBA_PRIVILEGE;
7483
priv = String(priv);

0 commit comments

Comments
 (0)