Interface FilibusterGrpcTest


  • public interface FilibusterGrpcTest
    Testing interface for writing tests of services that issue GRPCs. Provides a number of features:
    • Ensures that setup, test, and teardown are logically separated, making fault injection only active when the test is in progress.
    • Ensures that developers stub all dependencies and indicate precisely which dependencies will be invoked how many times.
    • Forces developers to specifically indicate failure handling behavior for all RPCs issued by the application.
    • Applies compositional reasoning to minimize the number of failure scenarios the user has to specify.

    Requires that developers implement this interface and create a test method annotated with @TestWithFilibuster that just executes the interface function super.execute().

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default <ReqT,​ResT>
      void
      assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor)
      Use of this method informs Filibuster that any faults injected to this GRPC method will result in the primary assertions, placed in the assertTestBlock() continuing to hold true.
      default <ReqT,​ResT>
      void
      assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, io.grpc.Status.Code code)
      Use of this method informs Filibuster that any faults injected to this GRPC method with this status code will result in the primary assertions, placed in the assertTestBlock() continuing to hold true.
      default <ReqT,​ResT>
      void
      assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, io.grpc.Status.Code code, ReqT request)
      Use of this method informs Filibuster that any faults injected to this GRPC method with this status code and request will result in the primary assertions, placed in the assertTestBlock() continuing to hold true.
      default <ReqT,​ResT>
      void
      assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, ReqT request)
      Use of this method informs Filibuster that any faults injected to this GRPC method with this request will result in the primary assertions, placed in the assertTestBlock() continuing to hold true.
      default <ReqT,​ResT>
      void
      assertFaultPropagates​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor)
      Indicate that this RPC endpoint has no error handling, or an error handler that logs and rethrows, and that any faults injected will be propagated directly back to the upstream.
      default void assertFaultThrows​(CompositeFaultSpecification compositeFaultSpecification, io.grpc.Status.Code thrownCode, java.lang.String thrownMessage)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
      default <ReqT,​ResT>
      void
      assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, io.grpc.Status.Code code, io.grpc.Status.Code thrownCode, java.lang.String thrownMessage)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
      default <ReqT,​ResT>
      void
      assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, io.grpc.Status.Code thrownCode, java.lang.String thrownMessage)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
      default <ReqT,​ResT>
      void
      assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, io.grpc.Status.Code code, ReqT request, io.grpc.Status.Code thrownCode, java.lang.String thrownMessage)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
      default <ReqT,​ResT>
      void
      assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, ReqT request, io.grpc.Status.Code thrownCode, java.lang.String thrownMessage)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
      default void assertOnException​(io.grpc.Status.Code code, java.lang.Runnable runnable)
      Use of this method informs Filibuster that different assertions will hold true when this error code is returned to the user, as part of a StatusRuntimeException.
      default void assertOnFault​(CompositeFaultSpecification compositeFaultSpecification, java.lang.Runnable runnable)
      Use of this method informs Filibuster that these combined faults will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable.
      default <ReqT,​ResT>
      void
      assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, io.grpc.Status.Code code, java.lang.Runnable runnable)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable.
      default <ReqT,​ResT>
      void
      assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, io.grpc.Status.Code code, ReqT request, java.lang.Runnable runnable)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable.
      default <ReqT,​ResT>
      void
      assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, java.lang.Runnable runnable)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable.
      default <ReqT,​ResT>
      void
      assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, ReqT request, java.lang.Runnable runnable)
      Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable.
      void assertStubBlock()
      Test authors should use this block for performing assertions on stub invocations.
      void assertTestBlock()
      Test authors should place test assertions here.
      default FaultKey didUserIndicatePropagationOfFault​(org.json.JSONObject rpcWhereFaultInjected)  
      default java.util.List<FaultKey> didUserIndicateThrownExceptionForFault​(org.json.JSONObject rpcWhereFaultInjected)  
      default void execute()  
      void executeTestBlock()
      Test authors should place test execution code here.
      void failureBlock()
      Test authors should place failure specification in this method.
      default java.util.Map<DistributedExecutionIndex,​org.json.JSONObject> getExecutedRpcs()  
      default java.util.Map<DistributedExecutionIndex,​org.json.JSONObject> getFailedRpcs()  
      default java.util.Map<DistributedExecutionIndex,​org.json.JSONObject> getFaultsInjected()  
      default com.google.protobuf.GeneratedMessageV3 getResponse()
      Get the GRPC response.
      default io.grpc.Status.Code getStatusCode​(java.lang.String exceptionFieldName, org.json.JSONObject jsonObject)  
      default void performMultipleExceptionChecking​(java.util.List<org.json.JSONObject> rpcsWhereFaultsInjected, io.grpc.StatusRuntimeException statusRuntimeException)  
      default boolean performMultipleFaultChecking​(java.util.List<org.json.JSONObject> rpcsWhereFaultsInjected)  
      default void performSingleExceptionChecking​(org.json.JSONObject rpcWhereFaultInjected, io.grpc.StatusRuntimeException statusRuntimeException)  
      default boolean performSingleFaultChecking​(org.json.JSONObject rpcWhereFaultInjected)  
      default <ReqT,​ResT>
      void
      readOnlyRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor)
      Indicates that this RPC has no side effects and therefore may be called 0 or more times.
      default <ReqT,​ResT>
      void
      readOnlyRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, ReqT request)
      Indicates that this RPC has no side effects and therefore may be called 0 or more times.
      default java.util.List<org.json.JSONObject> rpcsWhereFaultsInjected()  
      default void setResponse​(com.google.protobuf.GeneratedMessageV3 response)
      Set the GRPc response.
      void setupBlock()
      Test authors should put code for setup of the test in here.
      default <ReqT,​ResT>
      void
      sideEffectingRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, int count)
      Indicates that an RPC has side effects and therefore needs explicit invocation counts.
      default <ReqT,​ResT>
      void
      sideEffectingRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor, ReqT request, int count)
      Indicates that an RPC has side effects and therefore needs explicit invocation counts.
      void stubBlock()
      Test authors should use this block for stubbing any downstream dependencies that need to be stubbed for the test to pass.
      void teardownBlock()
      Test authors should use this block for performing test teardown.
      default void validatePropagationOfFault​(org.json.JSONObject rpcWhereFaultInjected, io.grpc.Status actualStatus)  
      default void validateThrownException​(java.util.List<FaultKey> matchingFaultKeys, io.grpc.StatusRuntimeException statusRuntimeException)  
      default void verifyAssertionBlockForThrownException​(io.grpc.StatusRuntimeException statusRuntimeException)  
    • Field Detail

      • response

        static final java.util.concurrent.atomic.AtomicReference<com.google.protobuf.GeneratedMessageV3> response
      • errorAssertions

        static final java.util.HashMap<io.grpc.Status.Code,​java.lang.Runnable> errorAssertions
      • faultKeysThatThrow

        static final java.util.HashMap<FaultKey,​java.util.Map.Entry<io.grpc.Status.Code,​java.lang.String>> faultKeysThatThrow
      • faultKeysThatPropagate

        static final java.util.List<FaultKey> faultKeysThatPropagate
      • faultKeysWithNoImpact

        static final java.util.List<FaultKey> faultKeysWithNoImpact
      • assertionsByFaultKey

        static final java.util.HashMap<FaultKey,​java.lang.Runnable> assertionsByFaultKey
    • Method Detail

      • setResponse

        default void setResponse​(com.google.protobuf.GeneratedMessageV3 response)
        Set the GRPc response. For use in executeTestBlock().
        Parameters:
        response - GRPC response
      • getResponse

        default com.google.protobuf.GeneratedMessageV3 getResponse()
        Get the GRPC response. For use in assertTestBlock().
        Returns:
        the GRPC response
      • setupBlock

        void setupBlock()
        Test authors should put code for setup of the test in here. Use of this block inhibits fault injection for any RPCs issued in this block. For example, if using the service-under-test's API to stage state for running a test, any downstream dependencies that are invoked as part of execution of the setup block will not be tested for faults. Thereby, this ensures that faults do not prevent proper staging before execution of the actual test.
      • stubBlock

        void stubBlock()
        Test authors should use this block for stubbing any downstream dependencies that need to be stubbed for the test to pass. Stubbing of these dependencies should be performed using the Filibuster-provided GrpcMock.stubFor(MethodDescriptor, ReqT, ResT) method and should NOT use GrpcMock directly as Filibuster needs to interpose on these mocks for fault injection testing.
      • executeTestBlock

        void executeTestBlock()
        Test authors should place test execution code here. Any downstream RPCs that are invoked as a result of a method invocation inside of this block will be subject to fault injection. Test authors should store any responses that are required for assertions -- placed in the assertion block assertTestBlock() -- in instance variables.
      • assertTestBlock

        void assertTestBlock()
        Test authors should place test assertions here. Use of this block inhibits fault injection, which is necessary when using the very API under test to perform assertions. For example, if your test looks up the user to subscribe them to a service and looks up the user to verify they were subscribed, you only want to inject a fault on the user lookup that's part of subscribing -- not verifying that they did indeed get subscribed.
      • assertStubBlock

        void assertStubBlock()
        Test authors should use this block for performing assertions on stub invocations. This should be done using the Filibuster-provided GrpcMock.verifyThat(MethodDescriptor, int) method and NOT using GrpcMock directly, as Filibuster must interpose on these calls to automatically adjust the expected invocation count when faults are injected.
      • teardownBlock

        void teardownBlock()
        Test authors should use this block for performing test teardown. Similar to the setupBlock() method, fault injection is inhibited for any downstream dependencies that are invoked as part of any method invoked in this block.
      • assertOnException

        default void assertOnException​(io.grpc.Status.Code code,
                                       java.lang.Runnable runnable)
        Use of this method informs Filibuster that different assertions will hold true when this error code is returned to the user, as part of a StatusRuntimeException. These assertions should be placed in the associated Runnable. This block will replace the assertions in assertTestBlock().
        Parameters:
        code - the thrown exception's status code when a fault is injected
        runnable - assertion block
      • assertFaultThrows

        default void assertFaultThrows​(CompositeFaultSpecification compositeFaultSpecification,
                                       io.grpc.Status.Code thrownCode,
                                       java.lang.String thrownMessage)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
        Parameters:
        compositeFaultSpecification - CompositeFaultSpecification
        thrownCode - the thrown exception's status code when a fault is injected
        thrownMessage - the thrown exception's message that is returned when a fault is injected
      • assertFaultThrows

        default <ReqT,​ResT> void assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                         io.grpc.Status.Code thrownCode,
                                                         java.lang.String thrownMessage)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        thrownCode - the thrown exception's status code when a fault is injected
        thrownMessage - the thrown exception's message that is returned when a fault is injected
      • assertFaultThrows

        default <ReqT,​ResT> void assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                         io.grpc.Status.Code code,
                                                         io.grpc.Status.Code thrownCode,
                                                         java.lang.String thrownMessage)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        code - the status code of the fault injected
        thrownCode - the thrown exception's status code when a fault is injected
        thrownMessage - the thrown exception's message that is returned when a fault is injected
      • assertFaultThrows

        default <ReqT,​ResT> void assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                         ReqT request,
                                                         io.grpc.Status.Code thrownCode,
                                                         java.lang.String thrownMessage)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        request - the request the fault was injected on
        thrownCode - the thrown exception's status code when a fault is injected
        thrownMessage - the thrown exception's message that is returned when a fault is injected
      • assertFaultThrows

        default <ReqT,​ResT> void assertFaultThrows​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                         io.grpc.Status.Code code,
                                                         ReqT request,
                                                         io.grpc.Status.Code thrownCode,
                                                         java.lang.String thrownMessage)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in the service returning a StatusRuntimeException with the specified code and message.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        code - the status code of the fault injected
        request - the request the fault was injected on
        thrownCode - the thrown exception's status code when a fault is injected
        thrownMessage - the thrown exception's message that is returned when a fault is injected
      • assertFaultPropagates

        default <ReqT,​ResT> void assertFaultPropagates​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor)
        Indicate that this RPC endpoint has no error handling, or an error handler that logs and rethrows, and that any faults injected will be propagated directly back to the upstream.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
      • assertFaultHasNoImpact

        default <ReqT,​ResT> void assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor)
        Use of this method informs Filibuster that any faults injected to this GRPC method will result in the primary assertions, placed in the assertTestBlock() continuing to hold true. Therefore, it has no effect on the test outcome when the fault is injected (except changing the stub invocation counts, which will be automatically adjusted when a fault is injected if the developer used the Filibuster-provided GrpcMock.stubFor and GrpcMock.verifyThat methods.)
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
      • assertFaultHasNoImpact

        default <ReqT,​ResT> void assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                              io.grpc.Status.Code code)
        Use of this method informs Filibuster that any faults injected to this GRPC method with this status code will result in the primary assertions, placed in the assertTestBlock() continuing to hold true. Therefore, it has no effect on the test outcome when the fault is injected (except changing the stub invocation counts, which will be automatically adjusted when a fault is injected if the developer used the Filibuster-provided GrpcMock.stubFor and GrpcMock.verifyThat methods.)
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        code - the status code
      • assertFaultHasNoImpact

        default <ReqT,​ResT> void assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                              ReqT request)
        Use of this method informs Filibuster that any faults injected to this GRPC method with this request will result in the primary assertions, placed in the assertTestBlock() continuing to hold true. Therefore, it has no effect on the test outcome when the fault is injected (except changing the stub invocation counts, which will be automatically adjusted when a fault is injected if the developer used the Filibuster-provided GrpcMock.stubFor and GrpcMock.verifyThat methods.)
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        request - the request
      • assertFaultHasNoImpact

        default <ReqT,​ResT> void assertFaultHasNoImpact​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                              io.grpc.Status.Code code,
                                                              ReqT request)
        Use of this method informs Filibuster that any faults injected to this GRPC method with this status code and request will result in the primary assertions, placed in the assertTestBlock() continuing to hold true. Therefore, it has no effect on the test outcome when the fault is injected (except changing the stub invocation counts, which will be automatically adjusted when a fault is injected if the developer used the Filibuster-provided GrpcMock.stubFor and GrpcMock.verifyThat methods.)
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        code - the status code
        request - the request
      • assertOnFault

        default <ReqT,​ResT> void assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                     java.lang.Runnable runnable)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable. This block will replace the assertions in assertTestBlock().
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        runnable - assertion block
      • assertOnFault

        default <ReqT,​ResT> void assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                     io.grpc.Status.Code code,
                                                     java.lang.Runnable runnable)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable. This block will replace the assertions in assertTestBlock().
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        code - the status code of the injected fault
        runnable - assertion block
      • assertOnFault

        default <ReqT,​ResT> void assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                     ReqT request,
                                                     java.lang.Runnable runnable)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable. This block will replace the assertions in assertTestBlock().
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        request - the request that the fault was injected on
        runnable - assertion block
      • assertOnFault

        default <ReqT,​ResT> void assertOnFault​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                     io.grpc.Status.Code code,
                                                     ReqT request,
                                                     java.lang.Runnable runnable)
        Use of this method informs Filibuster that any faults injected to this GRPC endpoint will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable. This block will replace the assertions in assertTestBlock().
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        code - the status code of the injected fault
        request - the request that the fault was injected on
        runnable - assertion block
      • assertOnFault

        default void assertOnFault​(CompositeFaultSpecification compositeFaultSpecification,
                                   java.lang.Runnable runnable)
        Use of this method informs Filibuster that these combined faults will result in possibly different assertions being true (other than the default block.) These assertions should be placed in the associated Runnable. This block will replace the assertions in assertTestBlock(). *
        Parameters:
        compositeFaultSpecification - CompositeFaultSpecification
        runnable - assertion block
      • readOnlyRpc

        default <ReqT,​ResT> void readOnlyRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor)
        Indicates that this RPC has no side effects and therefore may be called 0 or more times. Can only be used inside an assertOnException block.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
      • readOnlyRpc

        default <ReqT,​ResT> void readOnlyRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                   ReqT request)
        Indicates that this RPC has no side effects and therefore may be called 0 or more times. Can only be used inside an assertOnException block.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        request - the request
      • sideEffectingRpc

        default <ReqT,​ResT> void sideEffectingRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                        int count)
        Indicates that an RPC has side effects and therefore needs explicit invocation counts.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        count - the number of times invoked
      • sideEffectingRpc

        default <ReqT,​ResT> void sideEffectingRpc​(io.grpc.MethodDescriptor<ReqT,​ResT> methodDescriptor,
                                                        ReqT request,
                                                        int count)
        Indicates that an RPC has side effects and therefore needs explicit invocation counts.
        Type Parameters:
        ReqT - the request type for this method
        ResT - the response type for this method
        Parameters:
        methodDescriptor - a GRPC method descriptor
        request - the request
        count - the number of times invoked
      • rpcsWhereFaultsInjected

        default java.util.List<org.json.JSONObject> rpcsWhereFaultsInjected()
      • performSingleFaultChecking

        default boolean performSingleFaultChecking​(org.json.JSONObject rpcWhereFaultInjected)
      • performMultipleFaultChecking

        default boolean performMultipleFaultChecking​(java.util.List<org.json.JSONObject> rpcsWhereFaultsInjected)
      • execute

        default void execute()
      • getStatusCode

        @Nullable
        default io.grpc.Status.Code getStatusCode​(java.lang.String exceptionFieldName,
                                                  org.json.JSONObject jsonObject)
      • didUserIndicatePropagationOfFault

        default FaultKey didUserIndicatePropagationOfFault​(org.json.JSONObject rpcWhereFaultInjected)
      • didUserIndicateThrownExceptionForFault

        default java.util.List<FaultKey> didUserIndicateThrownExceptionForFault​(org.json.JSONObject rpcWhereFaultInjected)
      • validatePropagationOfFault

        default void validatePropagationOfFault​(org.json.JSONObject rpcWhereFaultInjected,
                                                io.grpc.Status actualStatus)
      • validateThrownException

        default void validateThrownException​(java.util.List<FaultKey> matchingFaultKeys,
                                             io.grpc.StatusRuntimeException statusRuntimeException)
      • performMultipleExceptionChecking

        default void performMultipleExceptionChecking​(java.util.List<org.json.JSONObject> rpcsWhereFaultsInjected,
                                                      io.grpc.StatusRuntimeException statusRuntimeException)
      • performSingleExceptionChecking

        default void performSingleExceptionChecking​(org.json.JSONObject rpcWhereFaultInjected,
                                                    io.grpc.StatusRuntimeException statusRuntimeException)
      • verifyAssertionBlockForThrownException

        default void verifyAssertionBlockForThrownException​(io.grpc.StatusRuntimeException statusRuntimeException)