Change DefaultHttpDataSourceTest to an instrumentation test

The Robolectric implementation of HttpURLConnection forwards to the JRE
implementation [1], which behaves differently to the Android one
available on devices and emulators. For these tests to be a realistic
test of the HTTP stack used in real playbacks we can't use Robolectric.

Similar to d1e12dcddf

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

PiperOrigin-RevId: 416013662
This commit is contained in:
ibaker 2021-12-13 12:56:55 +00:00 committed by tonihei
parent 075ee7fb3d
commit a4f67ccf6a
2 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ dependencies {
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:' + okhttpVersion
androidTestImplementation(project(modulePrefix + 'test-utils')) {
exclude module: modulePrefix.substring(1) + 'library-core'
}