File tree Expand file tree Collapse file tree
test/esm/integration/pool-cluster Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,21 +86,25 @@ const { createPoolCluster } = require('../../../../promise.js');
8686
8787 const poolNamespace = poolCluster . of ( 'MASTER' ) ;
8888
89+ assert . equal ( poolNamespace . poolNamespace , poolCluster . poolCluster . of ( 'MASTER' ) ) ;
90+
8991 const connection = await poolNamespace . getConnection ( ) ;
9092
9193 assert . ok ( connection , 'should get connection' ) ;
9294 connection . release ( ) ;
9395
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 = ?' ,
9698 [ 1 ] ,
9799 ) ;
98100 assert . equal ( result [ 0 ] [ 'a' ] , 1 , 'should query successfully' ) ;
99101
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 = ?' ,
102104 [ 1 ] ,
103105 ) ;
104106 assert . equal ( result2 [ 0 ] [ 'a' ] , 1 , 'should execute successfully' ) ;
107+
108+ poolCluster . end ( ) ;
105109 } ) ;
106110} ) ( ) ;
You can’t perform that action at this time.
0 commit comments