xref: /JGit/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/Repeat.java (revision 5c5f7c6b146b24f2bd4afae1902df85ad6e57ea3)
12d4d6448SMatthias Sohn /*
2*5c5f7c6bSMatthias Sohn  * Copyright (C) 2016, Matthias Sohn <matthias.sohn@sap.com> and others
32d4d6448SMatthias Sohn  *
4*5c5f7c6bSMatthias Sohn  * This program and the accompanying materials are made available under the
5*5c5f7c6bSMatthias Sohn  * terms of the Eclipse Distribution License v. 1.0 which is available at
6*5c5f7c6bSMatthias Sohn  * https://www.eclipse.org/org/documents/edl-v10.php.
72d4d6448SMatthias Sohn  *
8*5c5f7c6bSMatthias Sohn  * SPDX-License-Identifier: BSD-3-Clause
92d4d6448SMatthias Sohn  */
102d4d6448SMatthias Sohn package org.eclipse.jgit.junit;
112d4d6448SMatthias Sohn 
122d4d6448SMatthias Sohn import java.lang.annotation.Retention;
132d4d6448SMatthias Sohn import java.lang.annotation.RetentionPolicy;
142d4d6448SMatthias Sohn import java.lang.annotation.Target;
152d4d6448SMatthias Sohn 
16a90b75b4SMatthias Sohn /**
1709889361SDavid Pursehouse  * Annotation enabling to run tests repeatedly
18a90b75b4SMatthias Sohn  */
192d4d6448SMatthias Sohn @Retention(RetentionPolicy.RUNTIME)
202d4d6448SMatthias Sohn @Target({ java.lang.annotation.ElementType.METHOD })
212d4d6448SMatthias Sohn public @interface Repeat {
22a90b75b4SMatthias Sohn 	/**
23a90b75b4SMatthias Sohn 	 * Number of repetitions
24a90b75b4SMatthias Sohn 	 */
n()252d4d6448SMatthias Sohn 	public abstract int n();
26ba5d13edSMatthias Sohn 
27ba5d13edSMatthias Sohn 	/**
28ba5d13edSMatthias Sohn 	 * Whether to abort execution on first test failure
29ba5d13edSMatthias Sohn 	 *
30ba5d13edSMatthias Sohn 	 * @return {@code true} if execution should be aborted on the first failure,
31ba5d13edSMatthias Sohn 	 *         otherwise count failures and continue execution
32ba5d13edSMatthias Sohn 	 * @since 5.1.9
33ba5d13edSMatthias Sohn 	 */
abortOnFailure()34ba5d13edSMatthias Sohn 	public boolean abortOnFailure() default true;
352d4d6448SMatthias Sohn }
36