Skip to content

Commit

Permalink
Maintenance: Improve retrying of tests when exceptions occur on the W…
Browse files Browse the repository at this point in the history
…S handler.

(cherry picked from commit cc8b60a)
  • Loading branch information
mgruner authored and fliebe92 committed Aug 18, 2023
1 parent d33392d commit 3b8df7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/support/capybara/websocket_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

# give thread time to terminate
sleep 0.01 while websocket_server.status
rescue => e
# Handle any errors occuring within this hook, for example Net::ReadTimeout errors of the WS server.
# Otherwise, they would not cause the retry to kick in, but abort the process.
example.example.set_exception(e)
end

def ensure_port_available!(port)
Expand Down

0 comments on commit 3b8df7c

Please sign in to comment.