Skip to content

Commit

Permalink
Add some sleeps so the em-http-request callbacks are invoked in order.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Dec 3, 2010
1 parent 5ca6595 commit 49476df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion features/http_libraries/em_http_request.feature
Expand Up @@ -12,7 +12,12 @@ Feature: EM HTTP Request
require 'vcr_cucumber_helpers' require 'vcr_cucumber_helpers'
start_sinatra_app(:port => 7777) do start_sinatra_app(:port => 7777) do
get('/:path') { ARGV[0] + ' ' + params[:path] } %w[ foo bar bazz ].each_with_index do |path, index|
get "/#{path}" do
sleep index * 0.1 # ensure the async callbacks are invoked in order
ARGV[0] + ' ' + path
end
end
end end
require 'vcr' require 'vcr'
Expand Down

0 comments on commit 49476df

Please sign in to comment.