Skip to content

Commit 5ef3ee1

Browse files
JPeer264claude
andcommitted
test(node): Fix flaky MongoDB integration test
Set high heartbeatFrequencyMS (60s) to prevent extra MongoDB driver heartbeats from firing during the test. The 2 isMaster spans come from the initial connection handshake and are deterministic. Extra heartbeats were causing 9 spans instead of 8 on slower CI machines. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 959cf7e commit 5ef3ee1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • dev-packages/node-integration-tests/suites/tracing/mongodb

dev-packages/node-integration-tests/suites/tracing/mongodb/scenario.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const { MongoClient } = mongodb;
55

66
const client = new MongoClient(process.env.MONGO_URL || '', {
77
useUnifiedTopology: true,
8+
heartbeatFrequencyMS: 60000,
9+
minHeartbeatFrequencyMS: 60000,
810
});
911

1012
async function run() {

0 commit comments

Comments
 (0)