private long getTimeout(Test annotation) { if (annotation == null) { return 0; } return annotation.timeout(); }
private long getTimeout(Test annotation) { if (annotation == null) { return 0; } return annotation.timeout(); } }
/** * Retrieve the configured JUnit {@code timeout} from the {@link Test @Test} * annotation on the supplied {@linkplain FrameworkMethod test method}. * @return the timeout, or {@code 0} if none was specified */ protected long getJUnitTimeout(FrameworkMethod frameworkMethod) { Test test = frameworkMethod.getAnnotation(Test.class); return (test != null && test.timeout() > 0 ? test.timeout() : 0); }
public long getTimeout() { Test annotation = method.getAnnotation(Test.class); if (annotation == null) { return 0; } long timeout = annotation.timeout(); return timeout; }
public long getTimeout() { Test annotation = fMethod.getAnnotation(Test.class); if (annotation == null) { return 0; } long timeout = annotation.timeout(); return timeout; }
private long getTimeout(Test annotation) { if (annotation == null) { return 0; } return annotation.timeout(); } }
public long getTimeout() { Test annotation = fMethod.getAnnotation(Test.class); if (annotation == null) { return 0; } long timeout = annotation.timeout(); return timeout; }
protected long getTimeout(Test annotation) { if (annotation == null) { return 0; } return annotation.timeout(); } }
private long getTimeout(Test annotation) { if (annotation == null) { return 0; } return annotation.timeout(); } }
private long getTimeout(Test annotation) { if (annotation == null) { return 0; } return annotation.timeout(); } }
private long getTimeout(Test annotation) { if (annotation == null) { return 0; } return annotation.timeout(); }
public long getTimeout() { Test annotation = fMethod.getAnnotation(Test.class); if (annotation == null) { return 0; } long timeout = annotation.timeout(); return timeout; }
public long getTimeout() { Test annotation = fMethod.getAnnotation(Test.class); if (annotation == null) { return 0; } long timeout = annotation.timeout(); return timeout; }
public long getTimeout(final Method method) { final Test annotation = method.getAnnotation(Test.class); if (annotation != null) { return annotation.timeout(); } return 0; }
public long getTimeout() { Test annotation = method.getAnnotation(Test.class); if (annotation == null) { return 0; } long timeout = annotation.timeout(); return timeout; }
/** * Retrieve the configured JUnit {@code timeout} from the {@link Test @Test} * annotation on the supplied {@linkplain FrameworkMethod test method}. * @return the timeout, or {@code 0} if none was specified */ protected long getJUnitTimeout(FrameworkMethod frameworkMethod) { Test test = frameworkMethod.getAnnotation(Test.class); return (test != null && test.timeout() > 0 ? test.timeout() : 0); }
@Override protected Statement withPotentialTimeout(FrameworkMethod method, final Object test, Statement next) { Test annotation = method.getAnnotation(Test.class); timeout = annotation.timeout(); if (timeout > 0 && workflowTestRule != null) { workflowTestRule.setTestTimeoutActualTimeMilliseconds(timeout); } return next; }
@Override protected Statement withPotentialTimeout(final FrameworkMethod method, final Object test, Statement next) { Test annotation = method.getAnnotation(Test.class); long timeout = annotation.timeout(); if (timeout > 0) { long springTimeout = getSpringTimeout(method); if (workflowTestRule != null && springTimeout == 0) { workflowTestRule.setTestTimeoutActualTimeMilliseconds(timeout); } } return next; }
@Override protected Statement withPotentialTimeout(final FrameworkMethod method, final Object test, Statement next) { Test annotation = method.getAnnotation(Test.class); long timeout = annotation.timeout(); if (timeout > 0) { long springTimeout = getSpringTimeout(method); if (workflowTestRule != null && springTimeout == 0) { workflowTestRule.setTestTimeoutActualTimeMilliseconds(timeout); } } return next; }
/** * test for {@code Annotation} values. */ @Test public void annotation_convert() { Test annotation = description.getAnnotation(Test.class); AnnotationInfo info = (AnnotationInfo) ValueInfo.of(annotation); assertThat(info.getObject(), info.getDeclaringClass(), is(ClassInfo.of(Test.class))); assertThat(info.getElements(), hasEntry("expected", ClassInfo.of(annotation.expected()))); assertThat(info.getElements(), hasEntry("timeout", LongInfo.of(annotation.timeout()))); }