File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -99,12 +99,13 @@ def test_streaming_enumerator(env)
9999 end
100100
101101 def test_websocket_echo ( env )
102+ puts env . inspect
102103 Async ::WebSocket ::Adapters ::Rack . open ( env ) do |connection |
103104 while message = connection . read
104105 connection . write ( message )
105106 end
106107 connection . close
107- end or Protocol :: HTTP :: Response [ 404 , { } , [ ] ]
108+ end or [ 404 , { } , [ ] ]
108109 end
109110
110111 def test_middleware_body_itself ( env )
Original file line number Diff line number Diff line change 2222 ensure
2323 connection . close
2424 end
25+ rescue Async ::WebSocket ::ProtocolError => error
26+ # It's acceptable to not support WebSockets.
27+ raise unless error . message == "Failed to negotiate connection: 404"
2528 end
2629end
You can’t perform that action at this time.
0 commit comments