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
50
50
#) Added new properties in `oracledb ` that can enable users to customize and set session information,
51
51
making it easier to manage and monitor database interactions.
52
52
53
+ #) Error ``NJS-125 `` is now raised when an empty connect string is provided
54
+ for creating pools.
55
+
53
56
Thick Mode changes
54
57
++++++++++++++++++
55
58
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ class ThinPoolImpl extends PoolImpl {
44
44
if ( ! params . homogeneous ) {
45
45
errors . throwErr ( errors . ERR_NOT_IMPLEMENTED , 'Heterogeneous Pooling' ) ;
46
46
}
47
+ if ( ! params . connectString ) {
48
+ errors . throwErr ( errors . ERR_EMPTY_CONNECT_STRING ) ;
49
+ }
47
50
thinUtil . checkCredentials ( params ) ;
48
51
49
52
this . _availableObjects = [ ] ;
Original file line number Diff line number Diff line change @@ -80,8 +80,9 @@ Overview of node-oracledb functional tests
80
80
2.11.2 error occurs at getConnection() when poolMin is the default value 0
81
81
2.12 connectionString alias
82
82
2.12.1 allows connectionString to be used as an alias for connectString
83
- 2.13 connectString & connectionString provided
83
+ 2.13 connect string
84
84
2.13.1 both connectString & connectionString provided
85
+ 2.13.2 Negative - empty connect string
85
86
2.14 username alias
86
87
2.14.1 allows username to be used as an alias for user
87
88
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() {
616
616
} ) ;
617
617
} ) ; // 2.12
618
618
619
- describe ( '2.13 connectString & connectionString provided ' , function ( ) {
619
+ describe ( '2.13 connect string ' , function ( ) {
620
620
621
621
it ( '2.13.1 both connectString & connectionString provided' , async function ( ) {
622
622
const config = { ...dbConfig ,
@@ -630,6 +630,21 @@ describe('2. pool.js', function() {
630
630
/ N J S - 0 7 5 : /
631
631
) ;
632
632
} ) ; // 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
633
648
} ) ; // 2.13
634
649
635
650
describe ( '2.14 username alias' , function ( ) {
You can’t perform that action at this time.
0 commit comments