Commit 85b6a516 by olly Committed by bachinger

Add DoNotInstrument annotations to DASH and UI tests

PiperOrigin-RevId: 377048460
parent 5700401e
Showing with 38 additions and 0 deletions
......@@ -36,11 +36,13 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.Config;
import org.robolectric.annotation.internal.DoNotInstrument;
/** End-to-end tests using DASH samples. */
// TODO(b/143232359): Remove once https://issuetracker.google.com/143232359 is resolved.
@Config(sdk = 29)
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class DashPlaybackTest {
@Rule
......
......@@ -44,9 +44,11 @@ import java.io.InputStream;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit tests for {@link DashMediaPeriod}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class DashMediaPeriodTest {
@Test
......
......@@ -45,11 +45,13 @@ import java.util.concurrent.atomic.AtomicReference;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.LooperMode;
import org.robolectric.annotation.internal.DoNotInstrument;
import org.robolectric.shadows.ShadowLooper;
/** Unit test for {@link DashMediaSource}. */
@RunWith(AndroidJUnit4.class)
@LooperMode(PAUSED)
@DoNotInstrument
public final class DashMediaSourceTest {
private static final String SAMPLE_MPD_LIVE_WITHOUT_LIVE_CONFIGURATION =
......
......@@ -32,9 +32,11 @@ import java.util.Arrays;
import java.util.Collections;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit tests for {@link DashUtil}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class DashUtilTest {
@Test
......
......@@ -36,9 +36,11 @@ import com.google.android.exoplayer2.upstream.LoaderErrorThrower;
import com.google.common.collect.ImmutableList;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link DefaultDashChunkSource}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DefaultDashChunkSourceTest {
private static final String SAMPLE_MPD_LIVE_WITH_OFFSET_INSIDE_WINDOW =
......
......@@ -27,9 +27,11 @@ 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 DASH media sources with the {@link DefaultMediaSourceFactory}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DefaultMediaSourceFactoryTest {
private static final String URI_MEDIA = "http://exoplayer.dev/video";
......
......@@ -30,9 +30,11 @@ import com.google.android.exoplayer2.util.MimeTypes;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link EventSampleStream}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class EventSampleStreamTest {
private static final String SCHEME_ID = "urn:test";
......
......@@ -35,11 +35,13 @@ import java.util.Collections;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserFactory;
/** Unit tests for {@link DashManifestParser}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DashManifestParserTest {
private static final String SAMPLE_MPD_LIVE = "media/mpd/sample_mpd_live";
......
......@@ -29,9 +29,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 DashManifest}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DashManifestTest {
private static final UtcTimingElement UTC_TIMING = new UtcTimingElement("", "");
......
......@@ -21,9 +21,11 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.C;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link RangedUri}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class RangedUriTest {
private static final String BASE_URI = "http://www.test.com/";
......
......@@ -21,9 +21,11 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.C;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link SegmentBase}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class SegmentBaseTest {
@Test
......
......@@ -21,9 +21,11 @@ import static org.junit.Assert.fail;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit test for {@link UrlTemplate}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class UrlTemplateTest {
@Test
......
......@@ -57,9 +57,11 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit tests for {@link DashDownloader}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DashDownloaderTest {
private SimpleCache cache;
......
......@@ -25,9 +25,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 DASH {@link DownloadHelper}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public final class DownloadHelperTest {
@Test
......
......@@ -55,10 +55,12 @@ import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.MockitoAnnotations;
import org.robolectric.annotation.internal.DoNotInstrument;
import org.robolectric.shadows.ShadowLog;
/** Tests {@link DownloadManager}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DownloadManagerDashTest {
private static final int ASSERT_TRUE_TIMEOUT_MS = 5000;
......
......@@ -57,9 +57,11 @@ import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Unit tests for {@link DownloadService}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class DownloadServiceDashTest {
private SimpleCache cache;
......
......@@ -21,9 +21,11 @@ import android.graphics.Color;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Tests for {@link HtmlUtils}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class HtmlUtilsTest {
@Test
......
......@@ -39,9 +39,11 @@ import com.google.android.exoplayer2.text.span.TextEmphasisSpan;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.Config;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Tests for {@link SpannedToHtmlConverter}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class SpannedToHtmlConverterTest {
private final float displayDensity;
......
......@@ -34,9 +34,11 @@ import com.google.android.exoplayer2.text.span.TextAnnotation;
import com.google.android.exoplayer2.text.span.TextEmphasisSpan;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.internal.DoNotInstrument;
/** Tests for {@link SubtitleView}. */
@RunWith(AndroidJUnit4.class)
@DoNotInstrument
public class SubtitleViewUtilsTest {
private static final Cue CUE = buildCue();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment