From 3f2612da429dd50b1c9c8dab933000d7850b6edb Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Fri, 10 Jan 2020 21:43:47 +0100 Subject: [PATCH] conn.socket_io is compiled unconditionally now .. so we can remove the guards. --- spec/helpers.rb | 2 -- spec/pg/connection_spec.rb | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/spec/helpers.rb b/spec/helpers.rb index 5e0cde5b4..dab67a99a 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -370,8 +370,6 @@ def wait_for_query_result(conn) else config.filter_run_excluding :windows end - config.filter_run_excluding :socket_io unless - PG::Connection.instance_methods.map( &:to_sym ).include?( :socket_io ) config.filter_run_excluding( :postgresql_93 ) if PG.library_version < 90300 config.filter_run_excluding( :postgresql_94 ) if PG.library_version < 90400 diff --git a/spec/pg/connection_spec.rb b/spec/pg/connection_spec.rb index b8b1e9dd2..c36d4e246 100644 --- a/spec/pg/connection_spec.rb +++ b/spec/pg/connection_spec.rb @@ -173,7 +173,7 @@ end end - it "can connect asynchronously", :socket_io do + it "can connect asynchronously" do tmpconn = described_class.connect_start( @conninfo ) expect( tmpconn ).to be_a( described_class ) @@ -182,7 +182,7 @@ tmpconn.finish end - it "can connect asynchronously for the duration of a block", :socket_io do + it "can connect asynchronously for the duration of a block" do conn = nil described_class.connect_start(@conninfo) do |tmpconn| @@ -196,7 +196,7 @@ expect( conn ).to be_finished() end - context "with async established connection", :socket_io do + context "with async established connection" do before :each do @conn2 = described_class.connect_start( @conninfo ) wait_for_polling_ok(@conn2) @@ -902,7 +902,7 @@ end - it "handles server close while asynchronous connect", :socket_io do + it "handles server close while asynchronous connect" do serv = TCPServer.new( '127.0.0.1', 54320 ) conn = described_class.connect_start( '127.0.0.1', 54320, "", "", "me", "xxxx", "somedb" ) expect( [PG::PGRES_POLLING_WRITING, PG::CONNECTION_OK] ).to include conn.connect_poll @@ -963,7 +963,7 @@ conn.close end - it "closes the IO fetched from #socket_io when the connection is closed", :without_transaction, :socket_io do + it "closes the IO fetched from #socket_io when the connection is closed", :without_transaction do conn = PG.connect( @conninfo ) io = conn.socket_io conn.finish @@ -971,7 +971,7 @@ expect { conn.socket_io }.to raise_error( PG::ConnectionBad, /connection is closed/i ) end - it "closes the IO fetched from #socket_io when the connection is reset", :without_transaction, :socket_io do + it "closes the IO fetched from #socket_io when the connection is reset", :without_transaction do conn = PG.connect( @conninfo ) io = conn.socket_io conn.reset