diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2016-05-25 01:07:18 +0200 |
---|---|---|
committer | Andrey Loskutov <loskutov@gmx.de> | 2016-08-25 17:36:32 -0400 |
commit | 2d4d64481b397852a21813defe40ff70c3e79718 (patch) | |
tree | 8ea357f8d864b421cf65b1c97a66564e472aacbc /org.eclipse.jgit.test/tst | |
parent | ffbe03aa9b0e1e3b0bbb44baeab34d39cf09bb23 (diff) | |
download | jgit-2d4d64481b397852a21813defe40ff70c3e79718.tar.gz jgit-2d4d64481b397852a21813defe40ff70c3e79718.zip |
Add a RepeatRule to help repeating flaky tests
A JUnit TestRule which enables to run the same JUnit test repeatedly.
This may help to identify the root cause why a flaky tests which succeed
most often does fail sometimes.
Add the RepeatRule to the test class containing the test to be repeated:
public class MyTest {
@Rule
public RepeatRule repeatRule = new RepeatRule();
...
}
and annotate the test to be repeated with the @Repeat(n=<repetitions>)
annotation:
@Test
@Repeat(n = 100)
public void test() {
...
}
then this test will be repeated 100 times. If any test execution fails
test repetition will be stopped.
Change-Id: I7c49ccebe1cb00bcde6b002b522d95c13fd3a35e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
0 files changed, 0 insertions, 0 deletions