calabash-cucumber 0.9.85 → 0.9.86

Sign up to get free protection for your applications and to get access to all the features.
@@ -351,23 +351,24 @@ module Calabash
351
351
 
352
352
  def make_http_request(url, req)
353
353
  body = nil
354
- #CAL_HTTP_RETRY_COUNT.times do |count|
355
- # begin
354
+ CAL_HTTP_RETRY_COUNT.times do |count|
355
+ begin
356
356
  if not (@http) or not (@http.started?)
357
357
  @http = init_request(url)
358
358
  @http.start
359
359
  end
360
360
  body = @http.request(req).body
361
- # break
362
- # rescue Exception => e
363
- # if count < CAL_HTTP_RETRY_COUNT-1
364
- # puts "Retrying.."
365
- # else
366
- # puts "Failing..."
367
- # raise e
368
- # end
369
- # end
370
- #end
361
+ break
362
+ rescue Errno::ECONNRESET, EOFError, Errno::ECONNREFUSED => e
363
+ if count < CAL_HTTP_RETRY_COUNT-1
364
+ puts "Retrying.. (#{e})"
365
+ sleep(0.3)
366
+ else
367
+ puts "Failing..."
368
+ raise e
369
+ end
370
+ end
371
+ end
371
372
 
372
373
  body
373
374
  end
@@ -1,6 +1,6 @@
1
1
  module Calabash
2
2
  module Cucumber
3
- VERSION = "0.9.85"
3
+ VERSION = "0.9.86"
4
4
  FRAMEWORK_VERSION = "0.9.84"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.85
4
+ version: 0.9.86
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: