diff --git a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastPlayerTest.java b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastPlayerTest.java index 0e1fda177b..5eff45ee91 100644 --- a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastPlayerTest.java +++ b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastPlayerTest.java @@ -84,9 +84,11 @@ import org.mockito.Captor; import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.Mockito; +import org.robolectric.annotation.internal.DoNotInstrument; /** Tests for {@link CastPlayer}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class CastPlayerTest { private CastPlayer castPlayer; diff --git a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTimelineTrackerTest.java b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTimelineTrackerTest.java index cae117ea00..014009ed53 100644 --- a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTimelineTrackerTest.java +++ b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTimelineTrackerTest.java @@ -29,9 +29,11 @@ import java.util.Collections; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; +import org.robolectric.annotation.internal.DoNotInstrument; /** Tests for {@link CastTimelineTracker}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class CastTimelineTrackerTest { private static final long DURATION_2_MS = 2000; diff --git a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTrackSelectionTest.java b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTrackSelectionTest.java index 0a30c0c4b8..1aadc1bd6c 100644 --- a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTrackSelectionTest.java +++ b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTrackSelectionTest.java @@ -23,9 +23,11 @@ import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.source.TrackGroup; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Test for {@link CastTrackSelection}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class CastTrackSelectionTest { private static final TrackGroup TRACK_GROUP = diff --git a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/DefaultMediaItemConverterTest.java b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/DefaultMediaItemConverterTest.java index 9d80725c56..6e17ac8fd1 100644 --- a/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/DefaultMediaItemConverterTest.java +++ b/extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/DefaultMediaItemConverterTest.java @@ -27,9 +27,11 @@ import com.google.android.gms.cast.MediaQueueItem; import java.util.Collections; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Test for {@link DefaultMediaItemConverter}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class DefaultMediaItemConverterTest { @Test diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultMediaSourceFactoryTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultMediaSourceFactoryTest.java index 43c62071d3..598c106d64 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultMediaSourceFactoryTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultMediaSourceFactoryTest.java @@ -27,11 +27,13 @@ import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.util.MimeTypes; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** * Unit test for creating SmoothStreaming media sources with the {@link DefaultMediaSourceFactory}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class DefaultMediaSourceFactoryTest { private static final String URI_MEDIA = "http://exoplayer.dev/video"; diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriodTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriodTest.java index 81648706c4..ee8f56ad46 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriodTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriodTest.java @@ -37,9 +37,11 @@ import com.google.android.exoplayer2.upstream.TransferListener; import com.google.android.exoplayer2.util.MimeTypes; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit tests for {@link SsMediaPeriod}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class SsMediaPeriodTest { @Test diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSourceTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSourceTest.java index 7e6f659ce7..2a3aa2ab49 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSourceTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSourceTest.java @@ -25,9 +25,11 @@ import com.google.android.exoplayer2.upstream.FileDataSource; import java.util.Collections; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit tests for {@link SsMediaSource}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class SsMediaSourceTest { // Tests backwards compatibility diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java index e5a7ee5add..70c522535e 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java @@ -22,9 +22,11 @@ import com.google.android.exoplayer2.testutil.TestUtil; import java.io.IOException; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit tests for {@link SsManifestParser}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class SsManifestParserTest { private static final String SAMPLE_ISMC_1 = "media/smooth-streaming/sample_ismc_1"; diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java index 5715a787bd..4cc28fbee0 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java @@ -31,9 +31,11 @@ import java.util.List; import java.util.Random; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit tests for {@link SsManifest}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class SsManifestTest { @Test diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/DownloadHelperTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/DownloadHelperTest.java index df1a0bd6da..6525a147aa 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/DownloadHelperTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/DownloadHelperTest.java @@ -24,9 +24,11 @@ import com.google.android.exoplayer2.testutil.FakeDataSource; import com.google.android.exoplayer2.util.MimeTypes; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit test to verify creation of a SmoothStreaming {@link DownloadHelper}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class DownloadHelperTest { @Test diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloaderTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloaderTest.java index 38132b55ed..db4364de2c 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloaderTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloaderTest.java @@ -32,9 +32,11 @@ import java.util.Collections; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit tests for {@link SsDownloader}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class SsDownloaderTest { @Test diff --git a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SefSlowMotionVideoSampleTransformerTest.java b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SefSlowMotionVideoSampleTransformerTest.java index c29289e4c8..6bfeb61cd3 100644 --- a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SefSlowMotionVideoSampleTransformerTest.java +++ b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SefSlowMotionVideoSampleTransformerTest.java @@ -31,9 +31,11 @@ import java.util.Arrays; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit tests for {@link SefSlowMotionVideoSampleTransformer}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class SefSlowMotionVideoSampleTransformerTest { /** diff --git a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SegmentSpeedProviderTest.java b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SegmentSpeedProviderTest.java index 616443e963..40de5d3a52 100644 --- a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SegmentSpeedProviderTest.java +++ b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/SegmentSpeedProviderTest.java @@ -29,9 +29,11 @@ import com.google.common.collect.ImmutableList; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit tests for {@link SegmentSpeedProvider}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class SegmentSpeedProviderTest { private static final SmtaMetadataEntry SMTA_SPEED_8 = diff --git a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerBuilderTest.java b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerBuilderTest.java index 8cfba3156d..bd91385dca 100644 --- a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerBuilderTest.java +++ b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerBuilderTest.java @@ -24,9 +24,11 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.google.android.exoplayer2.util.MimeTypes; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit test for {@link Transformer.Builder}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class TransformerBuilderTest { @Test diff --git a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerTest.java b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerTest.java index a99b4a369b..655f45481a 100644 --- a/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerTest.java +++ b/library/transformer/src/test/java/com/google/android/exoplayer2/transformer/TransformerTest.java @@ -51,10 +51,12 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; import org.robolectric.shadows.ShadowMediaCodec; /** Unit test for {@link Transformer}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class TransformerTest { private static final String URI_PREFIX = "asset:///media/"; diff --git a/robolectricutils/src/test/java/com/google/android/exoplayer2/robolectric/RobolectricUtilTest.java b/robolectricutils/src/test/java/com/google/android/exoplayer2/robolectric/RobolectricUtilTest.java index 08d1a2ae2b..f4bd23e6e9 100644 --- a/robolectricutils/src/test/java/com/google/android/exoplayer2/robolectric/RobolectricUtilTest.java +++ b/robolectricutils/src/test/java/com/google/android/exoplayer2/robolectric/RobolectricUtilTest.java @@ -30,9 +30,11 @@ import com.google.common.base.Supplier; import java.util.concurrent.TimeoutException; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit test for {@link RobolectricUtil}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class RobolectricUtilTest { @Test public void createRobolectricConditionVariable_blockWithTimeout_timesOut() diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/AdditionalFailureInfoTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/AdditionalFailureInfoTest.java index 2087b1ad0e..9148c1784d 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/AdditionalFailureInfoTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/AdditionalFailureInfoTest.java @@ -29,9 +29,11 @@ import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runner.RunWith; import org.junit.runners.model.Statement; +import org.robolectric.annotation.internal.DoNotInstrument; /** Tests for {@link AdditionalFailureInfo}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class AdditionalFailureInfoTest { private final ExpectedException expectedException = new ExpectedException(); diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeAdaptiveDataSetTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeAdaptiveDataSetTest.java index e475e93ae2..de07b1f1ef 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeAdaptiveDataSetTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeAdaptiveDataSetTest.java @@ -28,9 +28,11 @@ import java.util.List; import java.util.Random; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit test for {@link FakeAdaptiveDataSet}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class FakeAdaptiveDataSetTest { private static final Format[] TEST_FORMATS = { diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeClockTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeClockTest.java index bcd6fa902e..2877f0e4cb 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeClockTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeClockTest.java @@ -32,10 +32,12 @@ import java.util.ArrayList; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; import org.robolectric.shadows.ShadowLooper; /** Unit test for {@link FakeClock}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class FakeClockTest { @Test diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSetTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSetTest.java index 0f7aabffc1..057cbeb731 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSetTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSetTest.java @@ -24,9 +24,11 @@ import java.io.IOException; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit test for {@link FakeDataSet} */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class FakeDataSetTest { @Test diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceContractTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceContractTest.java index 975d8f6f36..3bd56d7e60 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceContractTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceContractTest.java @@ -21,9 +21,11 @@ import com.google.android.exoplayer2.upstream.DataSource; import com.google.common.collect.ImmutableList; import org.junit.Before; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** {@link DataSource} contract tests for {@link FakeDataSource}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class FakeDataSourceContractTest extends DataSourceContractTest { private Uri simpleUri; diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceTest.java index 1a03134d98..c262dfe253 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/FakeDataSourceTest.java @@ -27,9 +27,11 @@ import java.util.Arrays; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Unit test for {@link FakeDataSource}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public final class FakeDataSourceTest { private static final String URI_STRING = "test://test.test"; diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/WebServerDispatcherTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/WebServerDispatcherTest.java index 2def3514f8..f8fb346c4d 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/WebServerDispatcherTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/WebServerDispatcherTest.java @@ -28,6 +28,7 @@ import okhttp3.mockwebserver.MockWebServer; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Tests for {@link WebServerDispatcher}. */ // We use the OkHttp client library for these tests because it's generally nicer to use than Java's @@ -51,6 +52,7 @@ import org.junit.runner.RunWith; // So instead we just don't test these cases that require passing header combinations that are // impossible with OkHttp. @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class WebServerDispatcherTest { private static int seed; diff --git a/testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java b/testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java index aaa399a47d..910a043f23 100644 --- a/testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java +++ b/testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java @@ -47,9 +47,11 @@ import com.google.android.exoplayer2.util.Util; import com.google.common.truth.ExpectFailure; import org.junit.Test; import org.junit.runner.RunWith; +import org.robolectric.annotation.internal.DoNotInstrument; /** Tests for {@link SpannedSubject}. */ @RunWith(AndroidJUnit4.class) +@DoNotInstrument public class SpannedSubjectTest { private static final String TEXT_PREFIX = "string with ";