Make DefaultHttpDataSourceContractTest an instrumentation test

Robolectric uses the JRE HttpURLConnection [1], while real Android
devices and emulators use OkHttp to implement HttpURLConnection. This
can lead to important differences in behaviour, so it's better to use
instrumentation tests when specific HTTP behaviour is important.

[1] https://github.com/robolectric/robolectric/issues/6769#issuecomment-943556156

PiperOrigin-RevId: 408840295
This commit is contained in:
ibaker 2021-11-10 12:00:57 +00:00 committed by tonihei
parent c1aaf580f7
commit df0e89c167
2 changed files with 2 additions and 0 deletions

View file

@ -18,10 +18,12 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.upstream.test">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-sdk/>
<application
android:allowBackup="false"
android:usesCleartextTraffic="true"
tools:ignore="MissingApplicationIcon,HardcodedDebugMode">
<provider
android:authorities="com.google.android.exoplayer2.testutil.AssetContentProvider"