Browse files

Add some sleeps so the em-http-request callbacks are invoked in order.

  • Loading branch information...
1 parent 5ca6595 commit 49476df509d1996c4bdda93a72855adc3eb8a1e7 @myronmarston committed Dec 3, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 features/http_libraries/em_http_request.feature
View
7 features/http_libraries/em_http_request.feature
@@ -12,7 +12,12 @@ Feature: EM HTTP Request
require 'vcr_cucumber_helpers'
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
require 'vcr'

0 comments on commit 49476df

Please sign in to comment.