spec/integration/client_spec.rb in mongo-2.18.3 vs spec/integration/client_spec.rb in mongo-2.19.0

- old
+ new

@@ -1,11 +1,14 @@ # frozen_string_literal: true -# encoding: utf-8 +# rubocop:todo all require 'spec_helper' describe 'Client' do + # TODO after the client is closed, operations should fail with an exception + # that communicates this state, instead of failing with server selection or + # pool errors. RUBY-3102, RUBY-3174. context 'after client is disconnected' do let(:client) { authorized_client.with(server_selection_timeout: 1) } before do client.close @@ -14,11 +17,13 @@ it 'is still usable for operations' do resp = client.database.command(ping: 1) expect(resp).to be_a(Mongo::Operation::Result) end - it 'is still usable for operations that can use sessions' do - client['collection'].insert_one(test: 1) + context 'operation that can use sessions' do + it 'is still usable for operations' do + client['collection'].insert_one(test: 1) + end end context 'after all servers are marked unknown' do require_topology :single, :replica_set, :sharded