File tree 2 files changed +3
-21
lines changed
2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change 25
25
require 'async'
26
26
27
27
RSpec . describe Async ::HTTP ::Faraday ::Adapter do
28
+ include_context Async ::RSpec ::Reactor
29
+
28
30
let ( :endpoint ) {
29
31
Async ::HTTP ::Endpoint . parse ( 'http://127.0.0.1:9294' )
30
32
}
@@ -86,25 +88,4 @@ def get_response(url, path)
86
88
expect ( response . body ) . to be_nil
87
89
end
88
90
end
89
-
90
- if RbConfig ::CONFIG [ 'host_os' ] =~ /linux/
91
- it 'does not leak sockets' do
92
- def get_socket_count
93
- `ls -l /proc/#{ $$} /fd | grep socket | wc -l` . to_i
94
- end
95
-
96
- REQUEST_COUNT = 3
97
-
98
- run_server ( Protocol ::HTTP ::Response [ 204 ] ) do
99
- # warm up
100
- get_response ( endpoint . url , '/index' )
101
-
102
- sockets_before = get_socket_count
103
- REQUEST_COUNT . times { get_response ( endpoint . url , '/index' ) }
104
- sockets_after = get_socket_count
105
-
106
- expect ( sockets_after ) . to eq sockets_before
107
- end
108
- end
109
- end
110
91
end
Original file line number Diff line number Diff line change 1
1
2
+ require 'async/rspec'
2
3
require 'covered/rspec'
3
4
4
5
RSpec . configure do |config |
You can’t perform that action at this time.
0 commit comments