Class KalixTestKit.Settings

Object
kalix.javasdk.testkit.KalixTestKit.Settings
Enclosing class:
KalixTestKit

public static class KalixTestKit.Settings extends Object
Settings for KalixTestkit.
  • Field Details

    • DEFAULT_STOP_TIMEOUT

      public static Duration DEFAULT_STOP_TIMEOUT
      Default stop timeout (10 seconds).
    • DEFAULT

      public static KalixTestKit.Settings DEFAULT
      Default settings for KalixTestkit.
    • stopTimeout

      public final Duration stopTimeout
      Timeout setting for stopping the local Kalix test instance.
    • serviceName

      public final String serviceName
      The name of this service when deployed.
    • aclEnabled

      public final boolean aclEnabled
      Whether ACL checking is enabled.
    • advancedViews

      public final boolean advancedViews
      Whether advanced View features are enabled.
    • workflowTickInterval

      public final Optional<Duration> workflowTickInterval
      To override workflow tick interval for integration tests
    • servicePortMappings

      public final Map<String,String> servicePortMappings
      Service port mappings from serviceName to host:port
    • eventingSupport

      public final KalixTestKit.Settings.EventingSupport eventingSupport
    • mockedEventing

      public final KalixTestKit.MockedEventing mockedEventing
  • Constructor Details

    • Settings

      @Deprecated public Settings(Duration stopTimeout)
      Deprecated.
      Use Settings.DEFAULT.withStopTimeout() instead.
      Create new settings for KalixTestkit.
      Parameters:
      stopTimeout - timeout to use when waiting for Kalix to stop
  • Method Details

    • withStopTimeout

      public KalixTestKit.Settings withStopTimeout(Duration stopTimeout)
      Set a custom stop timeout, for stopping the local Kalix test instance.
      Parameters:
      stopTimeout - timeout to use when waiting for Kalix to stop
      Returns:
      updated Settings
    • withServiceName

      public KalixTestKit.Settings withServiceName(String serviceName)
      Set the name of this service. This will be used by the service when making calls on other services run by the testkit to authenticate itself, allowing those services to apply ACLs based on that name.
      Parameters:
      serviceName - The name of this service.
      Returns:
      The updated settings.
    • withAclDisabled

      public KalixTestKit.Settings withAclDisabled()
      Disable ACL checking in this service.
      Returns:
      The updated settings.
    • withAclEnabled

      public KalixTestKit.Settings withAclEnabled()
      Enable ACL checking in this service.
      Returns:
      The updated settings.
    • withAdvancedViews

      public KalixTestKit.Settings withAdvancedViews()
      Enable advanced View features for this service.
      Returns:
      The updated settings.
    • withWorkflowTickInterval

      public KalixTestKit.Settings withWorkflowTickInterval(Duration tickInterval)
      Overrides workflow tick interval
      Returns:
      The updated settings.
    • withValueEntityIncomingMessages

      public KalixTestKit.Settings withValueEntityIncomingMessages(String typeId)
      Mock the incoming messages flow from a ValueEntity.
    • withEventSourcedEntityIncomingMessages

      public KalixTestKit.Settings withEventSourcedEntityIncomingMessages(String typeId)
      Mock the incoming events flow from an EventSourcedEntity.
    • withStreamIncomingMessages

      public KalixTestKit.Settings withStreamIncomingMessages(String service, String streamId)
      Mock the incoming messages flow from a Stream (eventing.in.direct in case of protobuf SDKs).
    • withTopicIncomingMessages

      public KalixTestKit.Settings withTopicIncomingMessages(String topic)
      Mock the incoming events flow from a Topic.
    • withTopicOutgoingMessages

      public KalixTestKit.Settings withTopicOutgoingMessages(String topic)
      Mock the outgoing events flow for a Topic.
    • withServicePortMapping

      public KalixTestKit.Settings withServicePortMapping(String serviceName, String host, int port)
      Add a service port mapping from serviceName to host:port.
      Returns:
      The updated settings.
    • withEventingSupport

      public KalixTestKit.Settings withEventingSupport(KalixTestKit.Settings.EventingSupport eventingSupport)
    • toString

      public String toString()
      Overrides:
      toString in class Object