Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add spec for disconnect_connection being called more than once

Some parts of Sequel may call disconnect_connection on an
already disconnected connection, so that's something that
should work.

I've seen freezes in do/postgres after checking connections
for validity, so just skip those specs on do/postgres.
  • Loading branch information...
commit 029254e1c7595b9eee1aaa4f13f41aa561ebcc10 1 parent 9a4201b
@jeremyevans authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 spec/integration/database_test.rb
9 spec/integration/database_test.rb
@@ -36,7 +36,14 @@
proc{INTEGRATION_DB.pool.hold{raise Interrupt, "test"}}.should raise_error(Interrupt)
- specify "should provide ability to check connections for validity" do
+ specify "should be able to disconnect connections more than once without exceptions" do
+ conn = INTEGRATION_DB.synchronize{|c| c}
+ INTEGRATION_DB.disconnect
+ INTEGRATION_DB.disconnect_connection(conn)
+ INTEGRATION_DB.disconnect_connection(conn)
+ end
+ cspecify "should provide ability to check connections for validity", [:do, :postgres] do
conn = INTEGRATION_DB.synchronize{|c| c}
INTEGRATION_DB.valid_connection?(conn).should be_true
Please sign in to comment.
Something went wrong with that request. Please try again.