Package com.antithesis.sdk
Class Lifecycle
java.lang.Object
com.antithesis.sdk.Lifecycle
The Lifecycle class contains methods which inform the Antithesis
environment that particular test phases or milestones have been reached.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Indicates to Antithesis that a certain event has been reached.static void
setupComplete
(com.fasterxml.jackson.databind.node.ObjectNode details) Indicates to Antithesis that setup has completed.
-
Constructor Details
-
Lifecycle
public Lifecycle()Default constructor
-
-
Method Details
-
setupComplete
public static void setupComplete(com.fasterxml.jackson.databind.node.ObjectNode details) Indicates to Antithesis that setup has completed. Call this function when your system and workload are fully initialized. After this function is called, Antithesis will take a snapshot of your system and begin injecting faults.Calling this function multiple times or from multiple processes will have no effect. Antithesis will treat the first time any process called this function as the moment that the setup was completed.
- Parameters:
details
- additional details that provide greater context for system setup. Evaluated at runtime.
-
sendEvent
Indicates to Antithesis that a certain event has been reached. It sends a structured log message to Antithesis that you may later use to aid debugging.In addition to
details
, you also providerawName
, which is the name of the event that you are logging.- Parameters:
name
- the name of the event that is being loggeddetails
- additional details that provide greater context for the lifecycle event. Evaluated at runtime.
-