Class ChaosExperimentOrchestrator.ExperimentDefinition

java.lang.Object
org.mockserver.mock.action.http.ChaosExperimentOrchestrator.ExperimentDefinition
Enclosing class:
ChaosExperimentOrchestrator

public static class ChaosExperimentOrchestrator.ExperimentDefinition extends Object
An experiment definition: name, ordered stages, whether to loop, and an optional deferred start (startDelayMillis and/or cronSchedule). When no scheduling fields are set the experiment starts immediately (back-compatible default).
  • Field Details

    • name

      public final String name
    • stages

    • loop

      public final boolean loop
    • startDelayMillis

      public final long startDelayMillis
      Fixed delay before stage 0 is applied; 0 = start immediately.
    • cronSchedule

      public final String cronSchedule
      Standard 5-field cron expression for the start time; null/blank = none.
    • sloCriteria

      public final SloCriteria sloCriteria
      Optional SLO asserted over the experiment window. When null the experiment behaves exactly as before (no verdict). When present, a terminal experimentVerdict is produced over the experiment window when the experiment terminates.
    • recurring

      public final boolean recurring
      When true and a cronSchedule is set, the experiment re-arms itself for the next cron occurrence after it completes naturally (retaining per-run verdict history), rather than terminating after a single run. Default false = the pre-existing one-shot behaviour. Ignored (rejected at validation) without a cron.
    • baselineWindowMillis

      public final long baselineWindowMillis
      When > 0 (and sloCriteria is set), the orchestrator evaluates the SLO over the pre-experiment lookback window [now - baselineWindowMillis, now] before applying stage 0. If the steady state does not already hold (verdict not PASS) the experiment refuses to start (aborted_baseline_unhealthy). Default 0 = no baseline pre-check (pre-existing behaviour).
  • Constructor Details

  • Method Details

    • usesTcpProfiles

      public boolean usesTcpProfiles()
      true when any stage stages one or more TCP chaos profiles.
    • fromJson

      public static ChaosExperimentOrchestrator.ExperimentDefinition fromJson(com.fasterxml.jackson.databind.JsonNode node)
      Deserializes an experiment definition from a JSON node.
    • toJson

      public com.fasterxml.jackson.databind.node.ObjectNode toJson()
      Serializes this experiment definition to a JSON node.