Class FilibusterInvocationInterceptor
- java.lang.Object
-
- cloud.filibuster.junit.interceptors.FilibusterInvocationInterceptor
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.InvocationInterceptor
public class FilibusterInvocationInterceptor extends java.lang.Object implements org.junit.jupiter.api.extension.InvocationInterceptor
Invocation Interceptor for automatically running tests with Filibuster.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
previousIterationFailed
static boolean
shouldInitializeFilibusterServer
-
Constructor Summary
Constructors Constructor Description FilibusterInvocationInterceptor(FilibusterConfiguration filibusterConfiguration, int currentIteration, int maxIterations, java.util.Map<java.lang.Integer,java.lang.Boolean> invocationCompletionMap)
Invocation interceptor for running tests with Filibuster.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.linecorp.armeria.client.WebClient
getWebClient()
void
interceptAfterEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
void
interceptBeforeEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
void
interceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
Invocation callbacks.void
interceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
-
-
-
Constructor Detail
-
FilibusterInvocationInterceptor
public FilibusterInvocationInterceptor(FilibusterConfiguration filibusterConfiguration, int currentIteration, int maxIterations, java.util.Map<java.lang.Integer,java.lang.Boolean> invocationCompletionMap)
Invocation interceptor for running tests with Filibuster.Automatically starts, stops the external Filibuster server and performs necessary IPC.
- Parameters:
filibusterConfiguration
- configuration of Filibuster server.currentIteration
- the current iteration that is being executed.maxIterations
- upper bound on allowable executions.invocationCompletionMap
- tracks whether teardown has been completed for a given test.
-
-
Method Detail
-
getWebClient
@Nullable public static com.linecorp.armeria.client.WebClient getWebClient()
-
interceptTestMethod
public void interceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable
Invocation callbacks.- Specified by:
interceptTestMethod
in interfaceorg.junit.jupiter.api.extension.InvocationInterceptor
- Throws:
java.lang.Throwable
-
interceptTestTemplateMethod
public void interceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable
- Specified by:
interceptTestTemplateMethod
in interfaceorg.junit.jupiter.api.extension.InvocationInterceptor
- Throws:
java.lang.Throwable
-
interceptBeforeEachMethod
public void interceptBeforeEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable
- Specified by:
interceptBeforeEachMethod
in interfaceorg.junit.jupiter.api.extension.InvocationInterceptor
- Throws:
java.lang.Throwable
-
interceptAfterEachMethod
public void interceptAfterEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable
- Specified by:
interceptAfterEachMethod
in interfaceorg.junit.jupiter.api.extension.InvocationInterceptor
- Throws:
java.lang.Throwable
-
-