Permalink
Browse files

spec: test connection status around reset

  • Loading branch information...
royaltm committed May 3, 2012
1 parent 4156ae5 commit f4df3f8631dc62956699dad4c30d9fc1009113ec
Showing with 4 additions and 0 deletions.
  1. +2 −0 spec/em_client_autoreconnect.rb
  2. +2 −0 spec/em_synchrony_client_autoreconnect.rb
@@ -104,8 +104,10 @@
end
it "should get database size using query after async manual connection reset" do
+ @client.status.should be PG::CONNECTION_BAD
@client.async_reset do |conn|
conn.should be @client
+ @client.status.should be PG::CONNECTION_OK
@tested_proc.call
end.should be_a_kind_of ::EM::DefaultDeferrable
end
@@ -101,7 +101,9 @@
end
it "should get database size using query after manual connection reset" do
+ @client.status.should be PG::CONNECTION_BAD
@client.reset
+ @client.status.should be PG::CONNECTION_OK
@tested_proc.call
end

0 comments on commit f4df3f8

Please sign in to comment.