| 1 |
package org.jmock.junit5.extensions; |
| 2 |
|
| 3 |
import java.lang.annotation.Retention; |
| 4 |
import java.lang.annotation.RetentionPolicy; |
| 5 |
|
| 6 |
import org.junit.jupiter.api.Test; |
| 7 |
|
| 8 |
/** |
| 9 |
* Aim to replace the old Junt4.@Test(timeout) functionality |
| 10 |
* |
| 11 |
* @author oliverbye |
| 12 |
*/ |
| 13 |
@Retention(RetentionPolicy.RUNTIME) |
| 14 |
@Test |
| 15 |
public @interface ExpectationTimeout { |
| 16 |
/** |
| 17 |
* Optionally specify <code>timeout</code> in milliseconds to cause a test |
| 18 |
* method to fail if execution time exceeds <code>timeout</code> milliseconds. |
| 19 |
*/ |
| 20 |
long timeout() default 0L; |
| 21 |
} |