Skip to content

Commit f8ded79

Browse files
committed
Add failing test case pool/test-create-connection.js
1 parent 43a570c commit f8ded79

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

test/common.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ common.createConnection = function(config) {
3131

3232
common.createPool = function(config) {
3333
config = mergeTestConfig(config);
34-
config.createConnection = common.createConnection;
34+
if (!config.createConnection) {
35+
config.createConnection = common.createConnection;
36+
}
3537
return Mysql.createPool(config);
3638
};
3739

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var common = require('../../common');
2+
var assert = require('assert');
3+
var Connection = require(common.lib + '/Connection');
4+
var pool = common.createPool({
5+
createConnection: function() {
6+
var connection = common.createConnection()
7+
connection.query('SET SESSION sql_mode="STRICT_ALL_TABLES"')
8+
return connection
9+
}
10+
});
11+
12+
pool.getConnection(function(err, connection) {
13+
if (err) throw err;
14+
pool.end()
15+
});

0 commit comments

Comments
 (0)