Skip to content

Commit 6f4b269

Browse files
committed
fixup: another iteration of allowed warnings
1 parent 85a08f1 commit 6f4b269

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

packages/java-shell/src/test/js/run-tests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ describe('java-shell tests', function() {
99
const packageRoot = path.resolve(__dirname, '..', '..', '..') + '/';
1010

1111
before(async function () {
12+
// We don't have a way to allow warnings for individual tests here
13+
testServer.allowWarning?.(() => true);
14+
1215
process.env.JAVA_SHELL_MONGOSH_TEST_URI = (await testServer.connectionString()).replace(/\/$/, '');
1316

1417
const connectionString = await testServer.connectionString();

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3038,10 +3038,10 @@ describe('Shard', function () {
30383038
let unsubscribeAllowWarnings: (() => void)[];
30393039

30403040
before(function () {
3041-
// Allow "Attempted to disable query sampling but query sampling was not active" warnings
3042-
unsubscribeAllowWarnings = [mongos, rs0, rs1].map((s) =>
3043-
s.allowWarning(7724700)
3044-
);
3041+
unsubscribeAllowWarnings = [mongos, rs0, rs1].flatMap((s) => [
3042+
s.allowWarning(7724700), // "Attempted to disable query sampling but query sampling was not active"
3043+
s.allowWarning(6791402), // "Error updating replica set on config server. Couldn't find shard."
3044+
]);
30453045
});
30463046

30473047
after(function () {

testing/integration-testing-hooks.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +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+
(l: LogEntry) => {
239+
// "Use of deprecated server parameter name" (FTDC)
240+
return l.id === 636300 && l.component === 'ftdc'
241+
},
238242
(l: LogEntry) => l.component === 'STORAGE', // Outside of mongosh's control
239243
(l: LogEntry) => l.context === 'BackgroundSync', // Outside of mongosh's control
240244
(l: LogEntry) => {
@@ -253,7 +257,12 @@ export class MongoRunnerSetup extends MongodSetup {
253257
// https://github.com/mongodb/mongo/blob/0c265adbde984c981946f804279693078e0b9f8a/src/mongo/db/global_catalog/ddl/sharding_catalog_manager.cpp#L558-L559
254258
// https://github.com/mongodb/mongo/blob/0c265adbde984c981946f804279693078e0b9f8a/src/mongo/s/balancer_configuration.cpp#L122-L143
255259
return l.id === 3216000 && ['ReplWriterWorker', 'OplogApplier'].some(match => l.context.includes(match));
256-
}
260+
},
261+
(l: LogEntry) => {
262+
// "Deprecated operation requested" for OP_QUERY which drivers may
263+
// still send in limited situations until NODE-6287 is done
264+
return l.id === 5578800 && l.attr?.op === 'query';
265+
},
257266
];
258267
}
259268

0 commit comments

Comments
 (0)