Skip to content

Commit 3157efb

Browse files
unskip tests and update cmap runner to use interruptInUseConnections
1 parent 89b27e9 commit 3157efb

File tree

3 files changed

+3
-26
lines changed

3 files changed

+3
-26
lines changed

test/integration/connection-monitoring-and-pooling/connection_monitoring_and_pooling.spec.test.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,6 @@ const LB_SKIP_TESTS: SkipDescription[] = [
1919
skipReason: 'cannot run against a load balanced environment'
2020
}));
2121

22-
const INTERRUPT_IN_USE_CONNECTIONS_TESTS: SkipDescription[] = [
23-
'Connections MUST be interrupted as soon as possible (interruptInUseConnections=true)',
24-
'Pool clear SHOULD schedule the next background thread run immediately (interruptInUseConnections: false)',
25-
'clear with interruptInUseConnections = true closes pending connections'
26-
].map(description => ({
27-
description,
28-
skipIfCondition: 'always',
29-
skipReason: 'TODO(NODE-4691): cancel inflight operations when heartbeat fails'
30-
}));
31-
3222
describe('Connection Monitoring and Pooling Spec Tests (Integration)', function () {
3323
const tests: CmapTest[] = loadSpecTests('connection-monitoring-and-pooling');
3424

@@ -40,6 +30,6 @@ describe('Connection Monitoring and Pooling Spec Tests (Integration)', function
4030
skipReason:
4131
'not applicable: waitQueueTimeoutMS limits connection establishment time in our driver'
4232
}
43-
]).concat(INTERRUPT_IN_USE_CONNECTIONS_TESTS)
33+
])
4434
});
4535
});

test/integration/server-discovery-and-monitoring/server_discovery_and_monitoring.spec.test.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,5 @@ import { loadSpecTests } from '../../spec';
44
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
55

66
describe('SDAM Unified Tests', function () {
7-
const sdamPoolClearedTests = [
8-
'Connection pool clear uses interruptInUseConnections=true after monitor timeout',
9-
'Error returned from connection pool clear with interruptInUseConnections=true is retryable',
10-
'Error returned from connection pool clear with interruptInUseConnections=true is retryable for write'
11-
];
12-
runUnifiedSuite(
13-
loadSpecTests(path.join('server-discovery-and-monitoring', 'unified')),
14-
({ description }) =>
15-
sdamPoolClearedTests.includes(description)
16-
? 'TODO(NODE-4691): interrupt in-use operations on heartbeat failure'
17-
: false
18-
);
7+
runUnifiedSuite(loadSpecTests(path.join('server-discovery-and-monitoring', 'unified')));
198
});

test/tools/cmap_spec_runner.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,8 @@ const getTestOpDefinitions = (threadContext: ThreadContext) => ({
197197

198198
return threadContext.pool.checkIn(connection);
199199
},
200-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
201200
clear: function (interruptInUseConnections: boolean) {
202-
// TODO(NODE-4619): pass interruptInUseConnections into clear pool method
203-
return threadContext.pool.clear();
201+
return threadContext.pool.clear({ interruptInUseConnections });
204202
},
205203
close: async function () {
206204
return await promisify(ConnectionPool.prototype.close).call(threadContext.pool);

0 commit comments

Comments
 (0)