lib/calabash-android/operations.rb in calabash-android-0.8.1 vs lib/calabash-android/operations.rb in calabash-android-0.8.2

- old
+ new

@@ -747,10 +747,14 @@ # https://github.com/calabash/calabash-android/issues/655 Calabash::Android::UsageTracker.new.post_usage_async end def start_application(intent) - result = JSON.parse(http("/start-application", {intent: intent})) + begin + result = JSON.parse(http("/start-application", {intent: intent}, {read_timeout: 60})) + rescue HTTPClient::ReceiveTimeoutError => e + raise "Failed to start application. Starting took more than 60 seconds: #{e.class} - #{e.message}" + end if result['outcome'] != 'SUCCESS' raise result['detail'] end