Skip to content

ci: skip flaky tests in retryable reads and sdam suites #4466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ const UNIMPLEMENTED_APIS = [
'listDatabaseObjects'
];

const skippedTests = ['collection.listIndexes succeeds after retryable handshake network error'];

describe('Retryable Reads (unified)', function () {
runUnifiedSuite(loadSpecTests(path.join('retryable-reads', 'unified')), ({ description }) => {
for (const apiName of UNIMPLEMENTED_APIS) {
if (description.toLowerCase().includes(apiName.toLowerCase())) {
return `The Node.js Driver does not support ${apiName}`;
}

if (skippedTests.includes(description)) {
return `TODO(NODE-6832): fix flaky retryable reads tests`;
}
}
return false;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,37 +146,40 @@ describe('Server Discovery and Monitoring Prose Tests', function () {
await client.close();
});

it('ensure monitors properly create and unpause connection pools when they discover servers', {
metadata: { requires: { mongodb: '>=4.2.9', topology: '!load-balanced' } },
test: async function () {
await client.connect();
expect(events.shift()).to.equal(SERVER_HEARTBEAT_SUCCEEDED);
expect(events.shift()).to.equal(CONNECTION_POOL_READY);

expect(events).to.be.empty;

const heartBeatFailedEvent = once(client, SERVER_HEARTBEAT_FAILED);
await client.db('admin').command({
configureFailPoint: 'failCommand',
mode: { times: 2 },
data: {
failCommands: ['hello'],
errorCode: 1234,
appName: 'SDAMPoolManagementTest'
}
});
await heartBeatFailedEvent;
expect(events.shift()).to.equal(SERVER_HEARTBEAT_FAILED);
expect(events.shift()).to.equal(CONNECTION_POOL_CLEARED);

expect(events).to.be.empty;

await once(client, SERVER_HEARTBEAT_SUCCEEDED);
expect(events.shift()).to.equal(SERVER_HEARTBEAT_SUCCEEDED);
expect(events.shift()).to.equal(CONNECTION_POOL_READY);

expect(events).to.be.empty;
it.skip(
'ensure monitors properly create and unpause connection pools when they discover servers',
{
metadata: { requires: { mongodb: '>=4.2.9', topology: '!load-balanced' } },
test: async function () {
await client.connect();
expect(events.shift()).to.equal(SERVER_HEARTBEAT_SUCCEEDED);
expect(events.shift()).to.equal(CONNECTION_POOL_READY);

expect(events).to.be.empty;

const heartBeatFailedEvent = once(client, SERVER_HEARTBEAT_FAILED);
await client.db('admin').command({
configureFailPoint: 'failCommand',
mode: { times: 2 },
data: {
failCommands: ['hello'],
errorCode: 1234,
appName: 'SDAMPoolManagementTest'
}
});
await heartBeatFailedEvent;
expect(events.shift()).to.equal(SERVER_HEARTBEAT_FAILED);
expect(events.shift()).to.equal(CONNECTION_POOL_CLEARED);

expect(events).to.be.empty;

await once(client, SERVER_HEARTBEAT_SUCCEEDED);
expect(events.shift()).to.equal(SERVER_HEARTBEAT_SUCCEEDED);
expect(events.shift()).to.equal(CONNECTION_POOL_READY);

expect(events).to.be.empty;
}
}
});
).skipReason = 'TODO(NODE-5206): fix flaky test';
});
});