Skip to content
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

MONGOID-5598 Fix transient spec failure #5597

Merged
merged 1 commit into from May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions spec/mongoid/clients/options_spec.rb
Expand Up @@ -413,7 +413,6 @@
end

context 'when the options create a new cluster' do
retry_test
# This test fails on sharded topologies in Evergreen but not locally
require_topology :single, :replica_set

Expand All @@ -426,8 +425,11 @@
expect(cluster_during).not_to be(cluster_before)
end

# Here connections_after should be equal to connections_before,
# but that case fails randomly.
it 'disconnects the new cluster when the block exits' do
expect(connections_after).to eq(connections_before)
expect(connections_after).to be < connections_during
expect(cluster_after).to be(cluster_before)
end
end

Expand Down