diff --git a/test/README.md b/test/README.md index 5796b779e..476aa60aa 100644 --- a/test/README.md +++ b/test/README.md @@ -112,6 +112,8 @@ Set the following environment variables to provide credentials for the test suit * `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. +* `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. + * `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. * `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. diff --git a/test/connection.js b/test/connection.js index 0e31ae7d1..3dff61cd8 100644 --- a/test/connection.js +++ b/test/connection.js @@ -367,8 +367,9 @@ describe('1. connection.js', function() { }; await assert.rejects( async () => await oracledb.getConnection(credential), - /ORA-01031:|ORA-24542:/ - ); + /ORA-01031:|ORA-24542:|ORA-56618:/ + // ORA-56618: DRCP: PRELIM mode logon not allowed + ); /*ORA-56618: This error is thrown when DRCP and Implicit Connection Pooling is enabled*/ }); }); // 1.7 diff --git a/test/dbconfig.js b/test/dbconfig.js index 0b6ea11ff..1e93f9394 100644 --- a/test/dbconfig.js +++ b/test/dbconfig.js @@ -37,6 +37,7 @@ * If required: * NODE_ORACLEDB_EXTERNALAUTH, * NODE_ORACLEDB_PROXY_SESSION_USER, NODE_ORACLEDB_DRCP, + * NODE_ORACLEDB_IMPLICIT_POOL * NODE_ORACLEDB_WALLET_LOCATION, NODE_ORACLEDB_WALLET_PASSWORD * *****************************************************************************/ @@ -52,7 +53,8 @@ const config = { instantClientPath: '', isCloudService: false, isCmanTdm: false, - drcp: false + drcp: false, + implicitPool: false } }; @@ -78,6 +80,13 @@ if (process.env.NODE_ORACLEDB_DRCP) { config.test.drcp = (process.env.NODE_ORACLEDB_DRCP.toLowerCase() === 'true'); } +if (process.env.NODE_ORACLEDB_IMPLICIT_POOL) { + if (!process.env.NODE_ORACLEDB_DRCP) + throw new Error("For Implicit pooling tests, NODE_ORACLEDB_DRCP needs to be enabled! Set the Environment Variable NODE_ORACLEDB_DRCP"); + else + config.test.implicitPool = (process.env.NODE_ORACLEDB_IMPLICIT_POOL.toLowerCase() === 'true'); +} + if (process.env.NODE_ORACLEDB_USER) { config.user = process.env.NODE_ORACLEDB_USER; } else { diff --git a/test/jsonDualityViews5.js b/test/jsonDualityViews5.js index 123b83786..5845c4d80 100644 --- a/test/jsonDualityViews5.js +++ b/test/jsonDualityViews5.js @@ -619,7 +619,7 @@ annotation or NOUPDATE annotation specified.*/ {StudentClassId : scid, Class : class {ClassId: clsid, Name: name}}} `), - /ORA-40895:/ /*ORA-40895: invalid SQL expression in JSON relational duality view (duplicate sub-object)*/ + /ORA-44971:/ //ORA-44971: JSON relational duality view cannot have duplicate column 'STUDENT'.'STUID' specified. ); await connection.execute(` diff --git a/test/keepInStmtCache.js b/test/keepInStmtCache.js index 4813deb71..18e1d67ad 100644 --- a/test/keepInStmtCache.js +++ b/test/keepInStmtCache.js @@ -44,7 +44,7 @@ describe('258. keepInStmtCache.js', function() { let sid; before(async function() { - if (!dbConfig.test.DBA_PRIVILEGE) { + if (!dbConfig.test.DBA_PRIVILEGE || dbConfig.test.implicitPool) { // Without DBA privilege, the test cannot get the current parse count! // So skip the tests this.skip(); diff --git a/test/listIndexes.js b/test/listIndexes.js index 0f49f6401..995774300 100644 --- a/test/listIndexes.js +++ b/test/listIndexes.js @@ -46,7 +46,7 @@ describe('286. listIndexes.js', function() { // For listIndexes, Oracle Client library version 19.13 (or later DBRU) // or version 21.3 (or higher) is needed runnable = runnable && (testsUtil.getClientVersion >= 1913000000 || - (testsUtil.getClientVersion >= 2100000000 && testsUtil.getClientVersion >= 2103000000)) + (testsUtil.getClientVersion >= 2100000000 && testsUtil.getClientVersion >= 2103000000)); if (!oracledb.thin) { await sodaUtil.cleanup(); } diff --git a/test/resultSet2.js b/test/resultSet2.js index 38cd9715b..dda1e2619 100644 --- a/test/resultSet2.js +++ b/test/resultSet2.js @@ -216,6 +216,7 @@ describe('55. resultSet2.js', function() { }); it('55.5.1 (1) get RS (2) modify data in that table and commit (3) check RS', async function() { + if (dbConfig.test.implicitPool) this.skip(); let rowsCount = 0; const result = await connection.execute( "SELECT * FROM nodb_rs2_emp ORDER BY employees_id",