File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import javax .annotation .Nonnull ;
1010
1111/**
12- * Marker annotation to skip test if it not run with mocks .
12+ * Marker annotation to skip test in certain cases .
1313 *
1414 * {@link MockOnlyRule}
1515 */
1919public @interface MockOnly {
2020
2121 /**
22- * Explanation why this test shold only be run with mocks and not against real websites
22+ * Explanation why this test should be skipped
2323 */
2424 @ Nonnull String reason ();
2525}
Original file line number Diff line number Diff line change 99import javax .annotation .Nonnull ;
1010
1111/**
12+ *
1213 * <p>
13- * Checks if the system variable "downloader" is set to "REAL" and skips the tests if it is.
14- * Otherwise execute the test.
14+ * Allows skipping unreliable or time sensitive tests in CI pipeline.
1515 * </p>
1616 *
1717 * <p>
1818 * Use it by creating a public variable of this inside the test class and annotate it with
19- * {@link org.junit.Rule}. Then annotate the tests to be skipped with {@link MockOnly}
19+ * {@link org.junit.Rule}. Then annotate the specific tests to be skipped with {@link MockOnly}
2020 * </p>
2121 *
2222 * <p>
23- * Allows skipping unreliable or time sensitive tests in CI pipeline.
23+ * It works by checking if the system variable "downloader" is set to "REAL" and skips the tests if it is.
24+ * Otherwise it executes the test.
2425 * </p>
26+
2527 */
2628public class MockOnlyRule implements TestRule {
2729
@@ -42,7 +44,6 @@ public void evaluate() throws Throwable {
4244 + annotation .reason (), isMockDownloader );
4345 }
4446
45-
4647 base .evaluate ();
4748 }
4849 };
You can’t perform that action at this time.
0 commit comments