Skip to content

Commit

Permalink
Merge pull request phoenixframework#1354 from Gazler/fix/intermittent…
Browse files Browse the repository at this point in the history
…-failure

tests(Phoenix.Integration.LongPollTest): fix intermittent failure
  • Loading branch information
Gazler committed Nov 16, 2015
2 parents a18840b + f4bda6d commit 46df3ee
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/phoenix/integration/long_poll_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ defmodule Phoenix.Integration.LongPollTest do
alias __MODULE__.Endpoint

@port 5808
@ensure_window_timeout_ms 500
@pool_size 1

Application.put_env(:phoenix, Endpoint, [
Expand Down Expand Up @@ -233,12 +232,9 @@ defmodule Phoenix.Integration.LongPollTest do
assert channel
Process.monitor(channel)

# 410 from crashed/terminated longpoller server when polling
:timer.sleep @ensure_window_timeout_ms

assert_receive({:DOWN, _, :process, ^channel, {:shutdown, :inactive}}, 5000)
resp = poll(:post, "/ws", session)
assert resp.body["status"] == 410
assert_receive {:DOWN, _, :process, ^channel, {:shutdown, :inactive}}
end
end

Expand Down

0 comments on commit 46df3ee

Please sign in to comment.