@@ -8,7 +8,12 @@ const { EJSON } = require('bson');
88const { isRecord } = require ( '../../../src/utils' ) ;
99const TestRunnerContext = require ( './context' ) . TestRunnerContext ;
1010const resolveConnectionString = require ( './utils' ) . resolveConnectionString ;
11- const { LEGACY_HELLO_COMMAND } = require ( '../../../src/constants' ) ;
11+ const {
12+ LEGACY_HELLO_COMMAND ,
13+ CMAP_EVENTS : SOURCE_CMAP_EVENTS ,
14+ TOPOLOGY_EVENTS ,
15+ HEARTBEAT_EVENTS
16+ } = require ( '../../../src/constants' ) ;
1217const { isAnyRequirementSatisfied } = require ( '../unified-spec-runner/unified-utils' ) ;
1318const ClientSideEncryptionFilter = require ( '../runner/filters/client_encryption_filter' ) ;
1419
@@ -158,16 +163,16 @@ function generateTopologyTests(testSuites, testContext, filter) {
158163
159164 const { spec } = this . currentTest ;
160165
161- if (
162- shouldRun &&
163- spec . operations . some (
164- op => op . name === 'waitForEvent' && op . arguments . event === 'PoolReadyEvent'
165- )
166- ) {
167- this . currentTest . skipReason =
168- 'TODO(NODE-2994): Connection storms work will add new events to connection pool' ;
169- shouldRun = false ;
170- }
166+ // if (
167+ // shouldRun &&
168+ // spec.operations.some(
169+ // op => op.name === 'waitForEvent' && op.arguments.event === 'PoolReadyEvent'
170+ // )
171+ // ) {
172+ // this.currentTest.skipReason =
173+ // 'TODO(NODE-2994): Connection storms work will add new events to connection pool';
174+ // shouldRun = false;
175+ // }
171176
172177 if ( shouldRun && spec . skipReason ) {
173178 this . currentTest . skipReason = spec . skipReason ;
@@ -329,29 +334,11 @@ function parseSessionOptions(options) {
329334
330335const IGNORED_COMMANDS = new Set ( [ LEGACY_HELLO_COMMAND , 'configureFailPoint' , 'endSessions' ] ) ;
331336const SDAM_EVENTS = new Set ( [
332- 'serverOpening' ,
333- 'serverClosed' ,
334- 'serverDescriptionChanged' ,
335- 'topologyOpening' ,
336- 'topologyClosed' ,
337- 'topologyDescriptionChanged' ,
338- 'serverHeartbeatStarted' ,
339- 'serverHeartbeatSucceeded' ,
340- 'serverHeartbeatFailed'
337+ ...TOPOLOGY_EVENTS . filter ( ev => ! [ 'error' , 'timeout' , 'close' ] . includes ( ev ) ) ,
338+ ...HEARTBEAT_EVENTS
341339] ) ;
342340
343- const CMAP_EVENTS = new Set ( [
344- 'connectionPoolCreated' ,
345- 'connectionPoolClosed' ,
346- 'connectionCreated' ,
347- 'connectionReady' ,
348- 'connectionClosed' ,
349- 'connectionCheckOutStarted' ,
350- 'connectionCheckOutFailed' ,
351- 'connectionCheckedOut' ,
352- 'connectionCheckedIn' ,
353- 'connectionPoolCleared'
354- ] ) ;
341+ const CMAP_EVENTS = new Set ( SOURCE_CMAP_EVENTS ) ;
355342
356343function runTestSuiteTest ( configuration , spec , context ) {
357344 context . commandEvents = [ ] ;
0 commit comments