Class TimeoutInterceptor
- java.lang.Object
-
- org.spockframework.runtime.extension.builtin.TimeoutInterceptor
-
- All Implemented Interfaces:
IMethodInterceptor
public class TimeoutInterceptor extends java.lang.Object implements IMethodInterceptor
Times out a method invocation if it takes too long. The method invocation will occur on the regular test framework thread. This can be important for integration tests with thread-local state.- Author:
- Peter Niederwieser
-
-
Constructor Summary
Constructors Constructor Description TimeoutInterceptor(Timeout timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
intercept(IMethodInvocation invocation)
-
-
-
Constructor Detail
-
TimeoutInterceptor
public TimeoutInterceptor(Timeout timeout)
-
-
Method Detail
-
intercept
public void intercept(IMethodInvocation invocation) throws java.lang.Throwable
- Specified by:
intercept
in interfaceIMethodInterceptor
- Throws:
java.lang.Throwable
-
-