dazinator / Xamarin.TestyDroid

TestyDroid is a small command line tool, to handle running your unit tests on an android device during CI builds.
MIT License
4 stars 0 forks source link

Bug with automatic adb restart #22

Closed dazinator closed 9 years ago

dazinator commented 9 years ago

When we attempt to restart adb, it tries to kill the current device - but there isn't yet one attached yet as this is happening during the start up - so this is causes an exception:

Attempting restart of adb server to resolve an issue.
[17:00:37][Step 5/7] Cannot kill as no device attached.
[17:00:37][Step 5/7] 
[17:00:37][Step 5/7] Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Unable to kill device as device not yet attached.
[17:00:37][Step 5/7]    at TestyDroid.AndroidEmulatorInstanceInfo.KillDevice()

I need to fix this bug - just add a simple check - don't try and kill the device if there isn't one attached yet!