Method: Calabash::Android::Operations::Device#shutdown_test_server

Defined in:
lib/calabash-android/operations.rb

#shutdown_test_serverObject

[View source]

669
670
671
672
673
674
675
676
677
678
679
680
681
682
# File 'lib/calabash-android/operations.rb', line 669

def shutdown_test_server
  begin
    http("/kill")
    Timeout::timeout(3) do
      sleep 0.3 while app_running?
    end
  rescue HTTPClient::KeepAliveDisconnected
    log ("Server not responding. Moving on.")
  rescue Timeout::Error
    log ("Could not kill app. Waited to 3 seconds.")
  rescue EOFError
    log ("Could not kill app. App is most likely not running anymore.")
  end
end