File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 27
27
require 'etc'
28
28
29
29
RSpec . shared_examples_for 'client benchmark' do
30
- include_context Async ::RSpec ::Reactor
31
-
32
30
let ( :endpoint ) { Async ::HTTP ::Endpoint . parse ( 'http://127.0.0.1:9294' , timeout : 0.8 , reuse_port : true ) }
33
31
34
32
let ( :server ) do
42
40
let ( :concurrency ) { Etc . nprocessors || 2 }
43
41
44
42
before do
45
- # We bind the endpoint before running the server so that we know incoming connections will be accepted:
46
- @bound_endpoint = Async ::IO ::SharedEndpoint . bound ( endpoint )
43
+ Sync do
44
+ # We bind the endpoint before running the server so that we know incoming connections will be accepted:
45
+ @bound_endpoint = Async ::IO ::SharedEndpoint . bound ( endpoint )
46
+ end
47
47
48
48
# I feel a dedicated class might be better than this hack:
49
49
allow ( @bound_endpoint ) . to receive ( :protocol ) . and_return ( endpoint . protocol )
You can’t perform that action at this time.
0 commit comments