diff --git a/extractor/src/test/java/org/schabi/newpipe/MockOnly.java b/extractor/src/test/java/org/schabi/newpipe/MockOnly.java index 69f8ac49..30a39c70 100644 --- a/extractor/src/test/java/org/schabi/newpipe/MockOnly.java +++ b/extractor/src/test/java/org/schabi/newpipe/MockOnly.java @@ -9,7 +9,7 @@ import java.lang.annotation.Target; import javax.annotation.Nonnull; /** - * Marker annotation to skip test if it not run with mocks. + * Marker annotation to skip test in certain cases. * * {@link MockOnlyRule} */ @@ -19,7 +19,7 @@ import javax.annotation.Nonnull; public @interface MockOnly { /** - * Explanation why this test shold only be run with mocks and not against real websites + * Explanation why this test should be skipped */ @Nonnull String reason(); } \ No newline at end of file diff --git a/extractor/src/test/java/org/schabi/newpipe/MockOnlyRule.java b/extractor/src/test/java/org/schabi/newpipe/MockOnlyRule.java index bbdf3d73..76c73944 100644 --- a/extractor/src/test/java/org/schabi/newpipe/MockOnlyRule.java +++ b/extractor/src/test/java/org/schabi/newpipe/MockOnlyRule.java @@ -9,19 +9,21 @@ import org.schabi.newpipe.downloader.DownloaderType; import javax.annotation.Nonnull; /** - *

- * Checks if the system variable "downloader" is set to "REAL" and skips the tests if it is. - * Otherwise execute the test. - *

- * - *

- * Use it by creating a public variable of this inside the test class and annotate it with - * {@link org.junit.Rule}. Then annotate the tests to be skipped with {@link MockOnly} - *

* *

* Allows skipping unreliable or time sensitive tests in CI pipeline. *

+ * + *

+ * Use it by creating a public variable of this inside the test class and annotate it with + * {@link org.junit.Rule}. Then annotate the specific tests to be skipped with {@link MockOnly} + *

+ * + *

+ * It works by checking if the system variable "downloader" is set to "REAL" and skips the tests if it is. + * Otherwise it executes the test. + *

+ */ public class MockOnlyRule implements TestRule { @@ -42,7 +44,6 @@ public class MockOnlyRule implements TestRule { + annotation.reason(), isMockDownloader); } - base.evaluate(); } };