org.spockframework.runtime.extension.builtin
Class TimeoutInterceptor

java.lang.Object
  extended by 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
TimeoutInterceptor(Timeout timeout)
           
 
Method Summary
 void intercept(IMethodInvocation invocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeoutInterceptor

public TimeoutInterceptor(Timeout timeout)
Method Detail

intercept

public void intercept(IMethodInvocation invocation)
               throws java.lang.Throwable
Specified by:
intercept in interface IMethodInterceptor
Throws:
java.lang.Throwable


Copyright © 2013. All rights reserved