From df0e89c1678ff0dda00bb187be05b8198bd31567 Mon Sep 17 00:00:00 2001 From: ibaker Date: Wed, 10 Nov 2021 12:00:57 +0000 Subject: [PATCH] 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 --- library/datasource/src/androidTest/AndroidManifest.xml | 2 ++ .../exoplayer2/upstream/DefaultHttpDataSourceContractTest.java | 0 2 files changed, 2 insertions(+) rename library/datasource/src/{test => androidTest}/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSourceContractTest.java (100%) diff --git a/library/datasource/src/androidTest/AndroidManifest.xml b/library/datasource/src/androidTest/AndroidManifest.xml index 5edae1db96..82fda9bf67 100644 --- a/library/datasource/src/androidTest/AndroidManifest.xml +++ b/library/datasource/src/androidTest/AndroidManifest.xml @@ -18,10 +18,12 @@ xmlns:tools="http://schemas.android.com/tools" package="com.google.android.exoplayer2.upstream.test"> +