Skip to content

Commit

Permalink
Remove timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Jan 26, 2018
1 parent e68af1e commit e6ce456
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions test/support/remote_debugging_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def remote_debug_and_connect(*commands)
remote_debug(*commands) do |wait_th|
launch_client

wait_for_client_startup

wait_th.value
end
end
Expand All @@ -67,7 +69,7 @@ def remote_debug_connect_and_interrupt(*commands)
remote_debug(*commands) do |wait_th|
th = Thread.new { launch_client }

sleep 0.1 until mutex.synchronize { client.started? }
wait_for_client_startup

th.kill

Expand All @@ -83,15 +85,15 @@ def remote_debug(*commands)
end
end

def wait_for_client_startup
sleep 0.1 until mutex.synchronize { client.started? }
end

def launch_client
Timeout.timeout(7) do
begin
mutex.synchronize { client.start("127.0.0.1") }
rescue Errno::ECONNREFUSED
sleep 0.1
retry
end
end
mutex.synchronize { client.start("127.0.0.1") }
rescue Errno::ECONNREFUSED
sleep 0.1
retry
end

def mutex
Expand Down

0 comments on commit e6ce456

Please sign in to comment.