File tree 1 file changed +8
-4
lines changed
test/esm/integration/pool-cluster
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -86,21 +86,25 @@ const { createPoolCluster } = require('../../../../promise.js');
86
86
87
87
const poolNamespace = poolCluster . of ( 'MASTER' ) ;
88
88
89
+ assert . equal ( poolNamespace . poolNamespace , poolCluster . poolCluster . of ( 'MASTER' ) ) ;
90
+
89
91
const connection = await poolNamespace . getConnection ( ) ;
90
92
91
93
assert . ok ( connection , 'should get connection' ) ;
92
94
connection . release ( ) ;
93
95
94
- const result = await poolNamespace . query (
95
- 'SELECT 1 as a from dual where 1 = ?' ,
96
+ const [ result ] = await poolNamespace . query (
97
+ 'SELECT 1 as a where 1 = ?' ,
96
98
[ 1 ] ,
97
99
) ;
98
100
assert . equal ( result [ 0 ] [ 'a' ] , 1 , 'should query successfully' ) ;
99
101
100
- const result2 = await poolNamespace . execute (
101
- 'SELECT 1 as a from dual where 1 = ?' ,
102
+ const [ result2 ] = await poolNamespace . execute (
103
+ 'SELECT 1 as a where 1 = ?' ,
102
104
[ 1 ] ,
103
105
) ;
104
106
assert . equal ( result2 [ 0 ] [ 'a' ] , 1 , 'should execute successfully' ) ;
107
+
108
+ poolCluster . end ( ) ;
105
109
} ) ;
106
110
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments