From 1ef9380083967aa32e8a34c5a90764c8aacc8e3e Mon Sep 17 00:00:00 2001 From: Sharad Chandran R Date: Mon, 29 Jan 2024 18:51:10 +0530 Subject: [PATCH] Test and Copyright year updates --- LICENSE.txt | 2 +- NOTICE.txt | 2 +- README.md | 2 +- doc/api.md | 2 +- doc/src/conf.py | 2 +- doc/src/license.rst | 2 +- test/list.txt | 4 +++- test/plsqlWarnings.js | 39 ++++++++++++++++++++++++++++++++++----- 8 files changed, 43 insertions(+), 12 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index e0980c3a..b32ec0a2 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2015, 2023 Oracle and/or its affiliates. +Copyright (c) 2015, 2024 Oracle and/or its affiliates. This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License diff --git a/NOTICE.txt b/NOTICE.txt index fd0685d8..b9e6f0fd 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1 +1 @@ -Copyright (c) 2015, 2023, Oracle and/or its affiliates. +Copyright (c) 2015, 2024, Oracle and/or its affiliates. diff --git a/README.md b/README.md index 9da5fc54..0a25ec4e 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ vulnerability disclosure process. ## License -Copyright (c) 2015, 2023, Oracle and/or its affiliates. +Copyright (c) 2015, 2024, Oracle and/or its affiliates. This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License diff --git a/doc/api.md b/doc/api.md index edae1c2b..a5432a61 100644 --- a/doc/api.md +++ b/doc/api.md @@ -1,6 +1,6 @@ # node-oracledb Documentation for the Oracle Database Node.js Add-on -*Copyright (c) 2015, 2023, Oracle and/or its affiliates.* +*Copyright (c) 2015, 2024, Oracle and/or its affiliates.* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License diff --git a/doc/src/conf.py b/doc/src/conf.py index b9f4d649..a8e3c029 100644 --- a/doc/src/conf.py +++ b/doc/src/conf.py @@ -34,7 +34,7 @@ root_doc = master_doc = 'index' # General substitutions. project = 'node-oracledb' -copyright = u'2015, 2023, Oracle and/or its affiliates' +copyright = u'2015, 2024, Oracle and/or its affiliates' author = 'Oracle' # The default replacements for |version| and |release|, also used in various diff --git a/doc/src/license.rst b/doc/src/license.rst index c73ec2a8..19f3e52f 100644 --- a/doc/src/license.rst +++ b/doc/src/license.rst @@ -10,7 +10,7 @@ License .. centered:: **LICENSE AGREEMENT FOR node-oracledb** -Copyright |copy| 2015, 2023 Oracle and/or its affiliates. +Copyright |copy| 2015, 2024 Oracle and/or its affiliates. This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License diff --git a/test/list.txt b/test/list.txt index 76483228..d243a359 100755 --- a/test/list.txt +++ b/test/list.txt @@ -5628,4 +5628,6 @@ oracledb.OUT_FORMAT_OBJECT and resultSet = true 293. plsqlWarnings.js 293.1 Warning on executing PL/SQL procedure - 293.2 Warning from PL/SQL query on a non-existing table \ No newline at end of file + 293.2 Warning from PL/SQL query on a non-existing table + 293.3 Warning from function in a PLSQL query + 293.4 with poolMin=0 with password in grace time with heterogeneous pool \ No newline at end of file diff --git a/test/plsqlWarnings.js b/test/plsqlWarnings.js index 221ac662..17790c86 100644 --- a/test/plsqlWarnings.js +++ b/test/plsqlWarnings.js @@ -36,8 +36,16 @@ const oracledb = require('oracledb'); const dbConfig = require('./dbconfig.js'); const assert = require('assert'); - describe('293. plsqlWarnings.js', function() { + let conn; + before(async function() { + conn = await oracledb.getConnection(dbConfig); + }); + + after(async function() { + await conn.close(); + }); + it('293.1 Warning on executing PL/SQL procedure', async () => { const plsql = ` CREATE OR REPLACE PROCEDURE GETDATEPROC(OUTTIME OUT TIMESTAMP) AS @@ -46,13 +54,11 @@ describe('293. plsqlWarnings.js', function() { END; `; - const conn = await oracledb.getConnection(dbConfig); const result = await conn.execute(plsql); assert.strictEqual(result.warning.message.startsWith("NJS-700:"), true); // cleanup await conn.execute(`DROP PROCEDURE GETDATEPROC`); - await conn.close(); }); // 293.1 // GH issue #823: https://github.com/oracle/node-oracledb/issues/823 @@ -65,13 +71,36 @@ describe('293. plsqlWarnings.js', function() { end; `; - const conn = await oracledb.getConnection(dbConfig); const result = await conn.execute(plsql); assert.strictEqual(result.warning.message.startsWith("NJS-700:"), true); // cleanup await conn.execute(`DROP PROCEDURE test293_2`); - await conn.close(); }); // 293.2 + it('293.3 Warning from function in a PLSQL query', async () => { + const plsql = ` + create or replace function test293_3 (x in number) + return varchar2(25) + as + f varchar2(25); + begin + f := 'This is a test'; + return f; + end test293_3; + `; + + const result = await conn.execute(plsql); + assert.strictEqual(result.warning.message.startsWith("NJS-700"), true); + // cleanup + await conn.execute(`DROP function test293_3`); + }); // 293.3 + + it('293.4 with poolMin=0 with password in grace time with heterogeneous pool', async function() { + const result = await conn.execute(`create or replace procedure selempty(empName in VARCHAR2) AS + BEGIN + select * from emp where ename = empName; + end;`); + assert.strictEqual(result.warning.code.startsWith("NJS-700"), true); + }); // 293.4 });