Skip to content

Commit 46f7ef3

Browse files
committedMay 22, 2024
Test case updates for 6.5.1
1 parent 9980a79 commit 46f7ef3

7 files changed

+19
-6
lines changed
 

‎test/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ Set the following environment variables to provide credentials for the test suit
112112

113113
* `NODE_ORACLEDB_DRCP` provides an option for skipping the test run when DRCP is enabled. Setting this environment variable to `true` will skip certain test case runs due to DRCP restrictions.
114114

115+
* `NODE_ORACLEDB_IMPLICIT_POOL` provides an option for skipping the test run when Implicit connection pooling is enabled. Setting this environment variable to `true` will skip certain test case runs due to Implicit connection pooling restrictions.
116+
115117
* `NODE_ORACLEDB_DRIVER_MODE` provides an option to set the 'Thin' or 'Thick' modes of node-oracledb. Setting this environment variable to `thick` will enable Thick mode. Setting it to `thin` will retain the Thin mode. The default mode is Thin.
116118

117119
* `NODE_ORACLEDB_WALLET_LOCATION` provides the local directory name for the wallets that may be required for mutual TLS (mTLS) connections, especially to Oracle Cloud Autonomous Databases optionally. The wallet location can also be provided as a part of the database connect string.

‎test/connection.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,9 @@ describe('1. connection.js', function() {
367367
};
368368
await assert.rejects(
369369
async () => await oracledb.getConnection(credential),
370-
/ORA-01031:|ORA-24542:/
371-
);
370+
/ORA-01031:|ORA-24542:|ORA-56618:/
371+
// ORA-56618: DRCP: PRELIM mode logon not allowed
372+
); /*ORA-56618: This error is thrown when DRCP and Implicit Connection Pooling is enabled*/
372373
});
373374

374375
}); // 1.7

‎test/dbconfig.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* If required:
3838
* NODE_ORACLEDB_EXTERNALAUTH,
3939
* NODE_ORACLEDB_PROXY_SESSION_USER, NODE_ORACLEDB_DRCP,
40+
* NODE_ORACLEDB_IMPLICIT_POOL
4041
* NODE_ORACLEDB_WALLET_LOCATION, NODE_ORACLEDB_WALLET_PASSWORD
4142
*
4243
*****************************************************************************/
@@ -52,7 +53,8 @@ const config = {
5253
instantClientPath: '',
5354
isCloudService: false,
5455
isCmanTdm: false,
55-
drcp: false
56+
drcp: false,
57+
implicitPool: false
5658
}
5759
};
5860

@@ -78,6 +80,13 @@ if (process.env.NODE_ORACLEDB_DRCP) {
7880
config.test.drcp = (process.env.NODE_ORACLEDB_DRCP.toLowerCase() === 'true');
7981
}
8082

83+
if (process.env.NODE_ORACLEDB_IMPLICIT_POOL) {
84+
if (!process.env.NODE_ORACLEDB_DRCP)
85+
throw new Error("For Implicit pooling tests, NODE_ORACLEDB_DRCP needs to be enabled! Set the Environment Variable NODE_ORACLEDB_DRCP");
86+
else
87+
config.test.implicitPool = (process.env.NODE_ORACLEDB_IMPLICIT_POOL.toLowerCase() === 'true');
88+
}
89+
8190
if (process.env.NODE_ORACLEDB_USER) {
8291
config.user = process.env.NODE_ORACLEDB_USER;
8392
} else {

‎test/jsonDualityViews5.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ annotation or NOUPDATE annotation specified.*/
619619
{StudentClassId : scid,
620620
Class : class {ClassId: clsid, Name: name}}}
621621
`),
622-
/ORA-40895:/ /*ORA-40895: invalid SQL expression in JSON relational duality view (duplicate sub-object)*/
622+
/ORA-44971:/ //ORA-44971: JSON relational duality view cannot have duplicate column 'STUDENT'.'STUID' specified.
623623
);
624624

625625
await connection.execute(`

‎test/keepInStmtCache.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('258. keepInStmtCache.js', function() {
4444
let sid;
4545

4646
before(async function() {
47-
if (!dbConfig.test.DBA_PRIVILEGE) {
47+
if (!dbConfig.test.DBA_PRIVILEGE || dbConfig.test.implicitPool) {
4848
// Without DBA privilege, the test cannot get the current parse count!
4949
// So skip the tests
5050
this.skip();

‎test/listIndexes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('286. listIndexes.js', function() {
4646
// For listIndexes, Oracle Client library version 19.13 (or later DBRU)
4747
// or version 21.3 (or higher) is needed
4848
runnable = runnable && (testsUtil.getClientVersion >= 1913000000 ||
49-
(testsUtil.getClientVersion >= 2100000000 && testsUtil.getClientVersion >= 2103000000))
49+
(testsUtil.getClientVersion >= 2100000000 && testsUtil.getClientVersion >= 2103000000));
5050
if (!oracledb.thin) {
5151
await sodaUtil.cleanup();
5252
}

‎test/resultSet2.js

+1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ describe('55. resultSet2.js', function() {
216216
});
217217

218218
it('55.5.1 (1) get RS (2) modify data in that table and commit (3) check RS', async function() {
219+
if (dbConfig.test.implicitPool) this.skip();
219220
let rowsCount = 0;
220221
const result = await connection.execute(
221222
"SELECT * FROM nodb_rs2_emp ORDER BY employees_id",

0 commit comments

Comments
 (0)
Please sign in to comment.