@@ -11,7 +11,6 @@ const assert = require('assert');
11
11
12
12
const createConnection = require ( '../../../promise.js' ) . createConnection ;
13
13
const createPool = require ( '../../../promise.js' ) . createPool ;
14
- const createPoolCluster = require ( '../../../promise.js' ) . createPoolCluster ;
15
14
16
15
// it's lazy exported from main index.js as well. Test that it's same function
17
16
const mainExport = require ( '../../../index.js' ) . createConnectionPromise ;
@@ -20,7 +19,6 @@ assert.equal(mainExport, createConnection);
20
19
let doneCalled = false ;
21
20
let exceptionCaught = false ;
22
21
let doneEventsConnect = false ;
23
- let eventsPoolCluster = false ;
24
22
25
23
let doneCalledPool = false ;
26
24
let exceptionCaughtPool = false ;
@@ -207,26 +205,6 @@ function testEventsConnect() {
207
205
} ) ;
208
206
}
209
207
210
- function testEventsConnectPoolCluster ( ) {
211
- const poolCluster = createPoolCluster ( ) ;
212
- let events = 0 ;
213
- /* eslint-disable no-invalid-this */
214
- poolCluster
215
- . once ( 'warn' , function ( ) {
216
- assert . equal ( this , poolCluster ) ;
217
- ++ events ;
218
- } )
219
- . once ( 'remove' , function ( ) {
220
- assert . equal ( this , poolCluster ) ;
221
- ++ events ;
222
- eventsPoolCluster = events === 2 ;
223
- } ) ;
224
- /* eslint-enable no-invalid-this */
225
- poolCluster . poolCluster . emit ( 'warn' , new Error ( ) ) ;
226
- poolCluster . poolCluster . emit ( "remove" ) ;
227
-
228
- }
229
-
230
208
function testBasicPool ( ) {
231
209
const pool = createPool ( config ) ;
232
210
const promiseConn = pool . getConnection ( ) ;
@@ -491,7 +469,6 @@ testBasicPool();
491
469
testErrorsPool ( ) ;
492
470
testObjParamsPool ( ) ;
493
471
testEventsPool ( ) ;
494
- testEventsConnectPoolCluster ( ) ;
495
472
testChangeUser ( ) ;
496
473
testConnectionProperties ( ) ;
497
474
testPoolConnectionDestroy ( ) ;
@@ -501,7 +478,6 @@ process.on('exit', () => {
501
478
assert . equal ( doneCalled , true , 'done not called' ) ;
502
479
assert . equal ( exceptionCaught , true , 'exception not caught' ) ;
503
480
assert . equal ( doneEventsConnect , true , 'wrong number of connection events' ) ;
504
- assert . equal ( eventsPoolCluster , true , 'wrong number of pool cluster events' ) ;
505
481
assert . equal ( doneCalledPool , true , 'pool done not called' ) ;
506
482
assert . equal ( exceptionCaughtPool , true , 'pool exception not caught' ) ;
507
483
assert . equal ( doneEventsPool , true , 'wrong number of pool connection events' ) ;
0 commit comments