File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed
Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ Thin Mode Changes
5050#) Added new properties in `oracledb ` that can enable users to customize and set session information,
5151 making it easier to manage and monitor database interactions.
5252
53+ #) Error ``NJS-125 `` is now raised when an empty connect string is provided
54+ for creating pools.
55+
5356Thick Mode changes
5457++++++++++++++++++
5558
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ class ThinPoolImpl extends PoolImpl {
4444 if ( ! params . homogeneous ) {
4545 errors . throwErr ( errors . ERR_NOT_IMPLEMENTED , 'Heterogeneous Pooling' ) ;
4646 }
47+ if ( ! params . connectString ) {
48+ errors . throwErr ( errors . ERR_EMPTY_CONNECT_STRING ) ;
49+ }
4750 thinUtil . checkCredentials ( params ) ;
4851
4952 this . _availableObjects = [ ] ;
Original file line number Diff line number Diff line change @@ -80,8 +80,9 @@ Overview of node-oracledb functional tests
8080 2.11.2 error occurs at getConnection() when poolMin is the default value 0
8181 2.12 connectionString alias
8282 2.12.1 allows connectionString to be used as an alias for connectString
83- 2.13 connectString & connectionString provided
83+ 2.13 connect string
8484 2.13.1 both connectString & connectionString provided
85+ 2.13.2 Negative - empty connect string
8586 2.14 username alias
8687 2.14.1 allows username to be used as an alias for user
8788 2.14.2 both user and username specified
Original file line number Diff line number Diff line change @@ -616,7 +616,7 @@ describe('2. pool.js', function() {
616616 } ) ;
617617 } ) ; // 2.12
618618
619- describe ( '2.13 connectString & connectionString provided ' , function ( ) {
619+ describe ( '2.13 connect string ' , function ( ) {
620620
621621 it ( '2.13.1 both connectString & connectionString provided' , async function ( ) {
622622 const config = { ...dbConfig ,
@@ -630,6 +630,21 @@ describe('2. pool.js', function() {
630630 / N J S - 0 7 5 : /
631631 ) ;
632632 } ) ; // 2.13.1
633+
634+ it ( '2.13.2 Negative - empty connect string' , async function ( ) {
635+ const config = { ...dbConfig ,
636+ connectString : dbConfig . connectString_does_not_exist ,
637+ poolMin : 1 ,
638+ poolMax : 1 ,
639+ poolIncrement : 0
640+ } ;
641+ await assert . rejects (
642+ async ( ) => await oracledb . createPool ( config ) ,
643+ / O R A - 0 1 0 1 7 : | N J S - 1 2 5 : /
644+ // ORA-01017: invalid username/password; logon denied
645+ // NJS-125: "connectString" cannot be empty or undefined. Bequeath connections are not supported in Thin mode
646+ ) ;
647+ } ) ; // 2.13.2
633648 } ) ; // 2.13
634649
635650 describe ( '2.14 username alias' , function ( ) {
You can’t perform that action at this time.
0 commit comments