Skip to content

Commit 3eeba5e

Browse files
committed
[misc] benchmark change on promise-mysql, since 4.0.0 change behaviour on createPool
(not returning pool object but promise)
1 parent 9fc5d23 commit 3eeba5e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

benchmarks/common_benchmarks.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,16 @@ function Bench() {
8787
promiseMysql
8888
.createConnection(config)
8989
.then(conn => {
90-
connList['PROMISE_MYSQL'].drv = conn;
91-
connList['PROMISE_MYSQL'].pool = promiseMysql.createPool(poolConfig);
92-
dbReady('promise-mysql', this.driverLen);
90+
promiseMysql
91+
.createPool(poolConfig)
92+
.then(pool => {
93+
connList['PROMISE_MYSQL'].drv = conn;
94+
connList['PROMISE_MYSQL'].pool = pool;
95+
dbReady('promise-mysql', this.driverLen);
96+
})
97+
.catch(err => {
98+
throw err;
99+
});
93100
})
94101
.catch(err => {
95102
throw err;

0 commit comments

Comments
 (0)