View Javadoc
1   /*
2    * Copyright (C) 2016, Matthias Sohn <matthias.sohn@sap.com> and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  package org.eclipse.jgit.junit;
11  
12  import java.lang.annotation.Retention;
13  import java.lang.annotation.RetentionPolicy;
14  import java.lang.annotation.Target;
15  
16  /**
17   * Annotation enabling to run tests repeatedly
18   */
19  @Retention(RetentionPolicy.RUNTIME)
20  @Target({ java.lang.annotation.ElementType.METHOD })
21  public @interface Repeat {
22  	/**
23  	 * Number of repetitions
24  	 */
25  	public abstract int n();
26  
27  	/**
28  	 * Whether to abort execution on first test failure
29  	 *
30  	 * @return {@code true} if execution should be aborted on the first failure,
31  	 *         otherwise count failures and continue execution
32  	 * @since 5.1.9
33  	 */
34  	public boolean abortOnFailure() default true;
35  }