Skip to content

Commit 9f6909f

Browse files
fix code lint
1 parent bdfbe5b commit 9f6909f

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/connection_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const validOptions = {
4848
// These options are used for Pool
4949
connectionLimit: 1,
5050
maxIdle: 1,
51-
idleTimeout: 60000,
51+
idleTimeout: 1,
5252
Promise: 1,
5353
queueLimit: 1,
5454
waitForConnections: 1

test/common.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ exports.getConfig = function(input) {
105105
timezone: args && args.timezone,
106106
dateStrings: args && args.dateStrings,
107107
authSwitchHandler: args && args.authSwitchHandler,
108-
typeCast: args && args.typeCast
108+
typeCast: args && args.typeCast,
109+
connectionLimit: args && args.connectionLimit,
110+
maxIdle: args && args.maxIdle,
111+
idleTimeout: args && args.idleTimeout,
109112
};
110113
return params;
111114
};

test/integration/test-pool-release-idle-connection.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
'use strict';
22

33
const createPool = require('../common.js').createPool;
4-
const config = require('../common.js').config;
54
const assert = require('assert');
65

7-
const options = Object.assign({
6+
const pool = new createPool({
87
connectionLimit: 5, // 5 connections
98
maxIdle: 1, // 1 idle connection
109
idleTimeout: 5000, // 5 seconds
11-
}, config);
12-
const pool = new createPool(options);
10+
});
1311

1412
pool.getConnection((err1, connection1) => {
1513
assert.ifError(err1);

0 commit comments

Comments
 (0)