Commits

Lars Kanis committed 5f29f24

Async connection test seems to be a bit racy on 1.8.7. So allow CONNECTION_OK, too.

Comments (0)

Files changed (1)

spec/pg/connection_spec.rb

 	it "can connect asynchronously" do
 		serv = TCPServer.new( '127.0.0.1', 54320 )
 		conn = described_class.connect_start( '127.0.0.1', 54320, "", "", "me", "xxxx", "somedb" )
-		conn.connect_poll.should == PG::PGRES_POLLING_WRITING
+		[PG::PGRES_POLLING_WRITING, PG::CONNECTION_OK].should include conn.connect_poll
 		select( nil, [IO.for_fd(conn.socket)], nil, 0.2 )
 		serv.close
 		if conn.connect_poll == PG::PGRES_POLLING_READING