Skip to content

Commit 6fb68a9

Browse files
committed
fixup: another iteration
1 parent 6f4b269 commit 6fb68a9

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

packages/service-provider-node-driver/src/node-driver-provider.integration.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,19 @@ describe('NodeDriverServiceProvider [integration]', function () {
192192
});
193193

194194
describe('#aggregate', function () {
195+
let unsubscribeAllowWarnings: (() => void)[] = [];
196+
197+
before(function () {
198+
// Allow "$function is deprecated" warning in logs
199+
unsubscribeAllowWarnings = [
200+
testServer.allowWarning?.(8996503) ?? [],
201+
].flat();
202+
});
203+
204+
after(function () {
205+
for (const cb of unsubscribeAllowWarnings) cb();
206+
});
207+
195208
context(
196209
'when passing a $function to be serialized by the driver',
197210
function () {

packages/shell-api/src/replica-set.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ describe('ReplicaSet', function () {
10291029
});
10301030

10311031
describe('remove member', function () {
1032-
let unsubscribeAllowWarnings: (() => void)[];
1032+
let unsubscribeAllowWarnings: (() => void)[] = [];
10331033

10341034
before(function () {
10351035
// Allow "Unable to forward progress" warnings
@@ -1079,7 +1079,7 @@ describe('ReplicaSet', function () {
10791079
});
10801080
describe('configureQueryAnalyzer()', function () {
10811081
skipIfServerVersion(srv0, '< 7.0'); // analyzeShardKey will only be added in 7.0 which is not included in stable yet
1082-
let unsubscribeAllowWarnings: (() => void)[];
1082+
let unsubscribeAllowWarnings: (() => void)[] = [];
10831083

10841084
before(function () {
10851085
// Allow "Attempted to disable query sampling but query sampling was not active" warnings
@@ -1135,7 +1135,7 @@ describe('ReplicaSet', function () {
11351135
);
11361136

11371137
let serviceProvider: NodeDriverServiceProvider;
1138-
let unsubscribeAllowWarnings: (() => void)[];
1138+
let unsubscribeAllowWarnings: (() => void)[] = [];
11391139

11401140
before(function () {
11411141
// Allow "replSetReconfig" errors

packages/shell-api/src/shard.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3035,7 +3035,7 @@ describe('Shard', function () {
30353035
});
30363036
describe('configureQueryAnalyzer()', function () {
30373037
skipIfServerVersion(mongos, '< 7.0'); // analyzeShardKey will only be added in 7.0 which is not included in stable yet
3038-
let unsubscribeAllowWarnings: (() => void)[];
3038+
let unsubscribeAllowWarnings: (() => void)[] = [];
30393039

30403040
before(function () {
30413041
unsubscribeAllowWarnings = [mongos, rs0, rs1].flatMap((s) => [

testing/integration-testing-hooks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,10 @@ export class MongoRunnerSetup extends MongodSetup {
235235
5123300, // "vm.max_map_count is too low"
236236
551190, // "Server certificate has no compatible Subject Alternative Name",
237237
20526, // "Failed to gather storage statistics for slow operation"
238+
22668, // "Unable to ping distributed locks"
238239
(l: LogEntry) => {
239240
// "Use of deprecated server parameter name" (FTDC)
240-
return l.id === 636300 && l.component === 'ftdc'
241+
return (l.id === 636300 || l.id === 23803) && l.context === 'ftdc'
241242
},
242243
(l: LogEntry) => l.component === 'STORAGE', // Outside of mongosh's control
243244
(l: LogEntry) => l.context === 'BackgroundSync', // Outside of mongosh's control

0 commit comments

Comments
 (0)