Skip to content

Commit e13e237

Browse files
committed
Fix typo and reword some explanations
1 parent adf9d7d commit e13e237

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/MockOnly.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import 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
*/
@@ -19,7 +19,7 @@
1919
public @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
}

extractor/src/test/java/org/schabi/newpipe/MockOnlyRule.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@
99
import 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
*/
2628
public 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
};

0 commit comments

Comments
 (0)