From de16dea00615162a244a07f14f46c68a57d8da7e Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 21 Jun 2021 15:05:27 +0100 Subject: [PATCH] Re-word the DataSourceContractTest javadoc This softens the language around suppressing individual test methods. There are some legitimate cases where this is needed, e.g. ByteArrayDataSourceContractTest has to suppress all the tests related to non-existent resources because it's not possible to simulate that case. #minor-release PiperOrigin-RevId: 380570017 --- .../exoplayer2/testutil/DataSourceContractTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/testutils/src/main/java/com/google/android/exoplayer2/testutil/DataSourceContractTest.java b/testutils/src/main/java/com/google/android/exoplayer2/testutil/DataSourceContractTest.java index 857b22a5e7..4bce4a11ab 100644 --- a/testutils/src/main/java/com/google/android/exoplayer2/testutil/DataSourceContractTest.java +++ b/testutils/src/main/java/com/google/android/exoplayer2/testutil/DataSourceContractTest.java @@ -53,16 +53,14 @@ import org.mockito.Mockito; /** * A collection of contract tests for {@link DataSource} implementations. * - *

All these tests should pass for all implementations - behaviour specific to only a subset of - * implementations should be tested elsewhere. - * *

Subclasses should only include the logic necessary to construct the DataSource and allow it to * successfully read data. They shouldn't include any new {@link Test @Test} methods - * implementation-specific tests should be in a separate class. * - *

If one of these tests fails for a particular {@link DataSource} implementation, that's a bug - * in the implementation. The test should be overridden in the subclass and annotated {@link - * Ignore}, with a link to an issue to track fixing the implementation and un-ignoring the test. + *

Most implementations should pass all these tests. If necessary, subclasses can disable tests + * by overriding the {@link Test @Test} method with a no-op implementation. It's recommended (but + * not required) to also annotate this {@link Ignore @Ignore} so that JUnit correclty reports the + * test as skipped/ignored instead of passing. */ @RequiresApi(19) public abstract class DataSourceContractTest {