Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor

        org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T extends java.lang.Object>
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor

        interceptAfterAllMethod, interceptBeforeAllMethod, interceptDynamicTest, interceptTestClassConstructor, interceptTestFactoryMethod
    • Field Detail

      • shouldInitializeFilibusterServer

        public static boolean shouldInitializeFilibusterServer
      • previousIterationFailed

        public static boolean previousIterationFailed
    • 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 interface org.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 interface org.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 interface org.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 interface org.junit.jupiter.api.extension.InvocationInterceptor
        Throws:
        java.lang.Throwable