X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a4724fe92e651abb06acf8c5e75184561a55c854..7dae5c418a130f07301282cb67f2f991671931db:/services/api/test/integration/websocket_test.rb diff --git a/services/api/test/integration/websocket_test.rb b/services/api/test/integration/websocket_test.rb index 4761800414..925d879906 100644 --- a/services/api/test/integration/websocket_test.rb +++ b/services/api/test/integration/websocket_test.rb @@ -31,8 +31,8 @@ class WebsocketTest < ActionDispatch::IntegrationTest ws.on :open do |event| opened = true if timeout - EM::Timer.new 3 do - too_long = true + EM::Timer.new 4 do + too_long = true if close_status.nil? EM.stop_event_loop end end @@ -142,7 +142,10 @@ class WebsocketTest < ActionDispatch::IntegrationTest state = 3 when 3 human_ev_uuid = d["object_uuid"] + state = 4 ws.close + when 4 + assert false, "Should not get any more events" end end @@ -176,7 +179,10 @@ class WebsocketTest < ActionDispatch::IntegrationTest state = 2 when 2 human_ev_uuid = d["object_uuid"] + state = 3 ws.close + when 3 + assert false, "Should not get any more events" end end @@ -219,7 +225,10 @@ class WebsocketTest < ActionDispatch::IntegrationTest state = 4 when 4 human_ev_uuid = d["object_uuid"] + state = 5 ws.close + when 5 + assert false, "Should not get any more events" end end @@ -260,7 +269,10 @@ class WebsocketTest < ActionDispatch::IntegrationTest when 3 l2 = d["object_uuid"] assert_not_nil l2, "Unexpected message: #{d}" + state = 4 ws.close + when 4 + assert false, "Should not get any more events" end end @@ -403,7 +415,10 @@ class WebsocketTest < ActionDispatch::IntegrationTest state = 4 when 4 human_ev_uuid = d["object_uuid"] + state = 5 ws.close + when 5 + assert false, "Should not get any more events" end end