Skip to content

Commit

Permalink
Add a little more time to a connection pool spec to reduce false nega…
Browse files Browse the repository at this point in the history
…tives
  • Loading branch information
jeremyevans committed Jun 22, 2010
1 parent dc1ac38 commit fa8c9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/core/connection_pool_spec.rb
Expand Up @@ -96,7 +96,7 @@


specify "#hold should remove the connection if a DatabaseDisconnectError is raised" do specify "#hold should remove the connection if a DatabaseDisconnectError is raised" do
@cpool.created_count.should == 0 @cpool.created_count.should == 0
@cpool.hold{Thread.new{@cpool.hold{}}; sleep 0.02} @cpool.hold{Thread.new{@cpool.hold{}}; sleep 0.03}
@cpool.created_count.should == 2 @cpool.created_count.should == 2
proc{@cpool.hold{raise Sequel::DatabaseDisconnectError}}.should raise_error(Sequel::DatabaseDisconnectError) proc{@cpool.hold{raise Sequel::DatabaseDisconnectError}}.should raise_error(Sequel::DatabaseDisconnectError)
@cpool.created_count.should == 1 @cpool.created_count.should == 1
Expand Down

0 comments on commit fa8c9bb

Please sign in to comment.