airbnb / okreplay

📼 Record and replay OkHttp network interaction in your tests.
Apache License 2.0
781 stars 71 forks source link

Call `terminate()` on DeviceProvider #104

Closed jschear closed 4 years ago

jschear commented 4 years ago

Resolves #102.

I noticed that connectedAndroidTest was sometimes hanging on our project, then found issue #102.

This PR calls terminate() on DeviceProvider by switching to the newer DeviceProvider#use API, which isn't present in AGP 3.5.0. I upgraded to AGP 3.6.0, Gradle 5.6.4 (the minimum supported by this version of AGP), and 2.0.1 of the groovy android gradle plugin in order to use this new method -- if it would be better to stay on AGP 3.5.0, it would be pretty easy to write our own version of use instead.