spec/mongo/collection/view/readable_spec.rb in mongo-2.10.5 vs spec/mongo/collection/view/readable_spec.rb in mongo-2.11.0.rc0

- old
+ new

@@ -366,14 +366,10 @@ end end context 'when the collection has a read preference set' do - after do - client.close(true) - end - let(:client) do # Set a timeout in case the collection read_preference does get used. # Otherwise, the test will hang for 30 seconds. authorized_client.with(server_selection_timeout: 1) end @@ -435,14 +431,10 @@ end context 'when the collection does not have a read preference set' do require_topology :single, :replica_set - after do - client.close(true) - end - let(:client) do authorized_client.with(server_selection_timeout: 1) end before do @@ -753,14 +745,10 @@ before do authorized_collection.insert_many(documents) end - after do - client.close(true) - end - let(:client) do # Set a timeout in case the collection read_preference does get used. # Otherwise, the test will hang for 30 seconds. authorized_client.with(server_selection_timeout: 1) end @@ -814,13 +802,9 @@ end before do authorized_collection.insert_many(documents) allow(view.collection.client.cluster).to receive(:single?).and_return(false) - end - - after do - client.close(true) end let(:client) do authorized_client.with(server_selection_timeout: 1) end