Class FaultInjectionServerErrorResultBuilder

java.lang.Object
com.azure.cosmos.test.faultinjection.FaultInjectionServerErrorResultBuilder

public final class FaultInjectionServerErrorResultBuilder extends Object
Fault injection server error result builder.
  • Method Details

    • times

      public FaultInjectionServerErrorResultBuilder times(int times)
      How many times the same fault injection rule can be applied per operation. By default, there is no limit.
      Parameters:
      times - the max times the same fault injection rule can be applied per operation.
      Returns:
      the builder.
    • delay

      This is only used for Server_Response_Delay and Server_Connection_Delay error tye. For SERVER_RESPONSE_DELAY, it means the delay added before returning the response. For SERVER_CONNECTION_DELAY, it means the delay added before starting the connection.
      Parameters:
      delay - the delay.
      Returns:
      the builder.
    • build

      Create a new fault injection server error result.
      Returns:
      the FaultInjectionServerErrorResult.
      Throws:
      IllegalArgumentException - if server type is response_delay or connection_delay but delay is not defined.