Skip to content

Commit

Permalink
1727
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Feb 19, 2019
1 parent 7ada77b commit 262ebf6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions spec/mongo/server/connection_pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
end

after do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end

Expand Down Expand Up @@ -133,7 +133,7 @@
end

it 'disconnects the queue' do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
expect(pool.send(:queue)).to receive(:disconnect!).once.and_call_original
server.disconnect!
end
Expand All @@ -150,7 +150,7 @@
end

after do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end

Expand All @@ -170,7 +170,7 @@
end

after do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end

Expand Down
4 changes: 2 additions & 2 deletions spec/mongo/server/connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,15 @@ class ConnectionSpecTestException < Exception; end

shared_examples_for 'does not disconnect connection pool' do
it 'does not disconnect non-monitoring sockets' do
allow(cluster).to receive(:pool).with(server).and_return(pool)
allow(server).to receive(:pool).and_return(pool)
expect(pool).not_to receive(:disconnect!)
error
end
end

shared_examples_for 'disconnects connection pool' do
it 'disconnects non-monitoring sockets' do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
expect(pool).to receive(:disconnect!).and_return(true)
error
end
Expand Down
10 changes: 5 additions & 5 deletions spec/mongo/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
end

after do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end

Expand Down Expand Up @@ -88,7 +88,7 @@

it 'stops the monitor instance' do
expect(server.instance_variable_get(:@monitor)).to receive(:stop!).and_return(true)
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end
end
Expand All @@ -106,7 +106,7 @@
end

after do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end

Expand Down Expand Up @@ -150,7 +150,7 @@
end

after do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end

Expand All @@ -170,7 +170,7 @@
end

after do
expect(cluster).to receive(:pool).with(server).and_return(pool)
expect(server).to receive(:pool).and_return(pool)
server.disconnect!
end

Expand Down

0 comments on commit 262ebf6

Please sign in to comment.