public interface LimitedRuntimeEngine
Modifier and Type | Method and Description |
---|---|
void |
clockDrift(String nodeName,
Integer amount)
Applies a clock drift with the given amount on the given node name
|
void |
enforceOrder(String eventName,
FailifyCheckedRunnable action)
This method waits indefinitely for the given test case event's dependencies to be marked as satisfied in the event
server, executes the given action, and finally, marks the given event name as satisfied in the event server.
|
void |
enforceOrder(String eventName,
Integer timeout,
FailifyCheckedRunnable action)
This method waits for the given test case event's dependencies to be marked as satisfied in the event server,
executes the given action, and finally, marks the given event name as satisfied in the event server.
|
String |
ip(String nodeName) |
void |
killNode(String nodeName)
Kills a node in the deployed environment.
|
void |
networkOperation(String nodeName,
NetOp.BuilderBase... netOpBuilder)
Applies a network operation including network delay and loss addition and removal on a node
|
void |
networkPartition(NetPart netPart)
Imposes a network partition based on the given partition scheme in the deployed environment
|
Set<String> |
nodeNames() |
Integer |
portMapping(String nodeName,
Integer portNumber,
PortType portType)
Returns the port mapping for a udp/tcp port number in a specific node
|
void |
removeNetworkPartition(NetPart netPart) |
void |
restartNode(String nodeName,
Integer secondsUntilForcedStop)
Restarts a node in the deployed environment.
|
CommandResults |
runCommandInNode(String nodeName,
String command)
Executes a shell command in the given node
|
void |
startNode(String nodeName)
Starts a node in the deployed environment.
|
void |
stopNode(String nodeName,
Integer secondsUntilForcedStop)
Stops a node in the deployed environment.
|
void |
waitFor(String eventName)
This method waits indefinitely for the given event's dependencies to be marked as satisfied in the event server.
|
void |
waitFor(String eventName,
Boolean includeEvent)
This method waits indefinitely for the given event's dependencies and the event itself (if desired) to be marked
as satisfied in the event server.
|
void |
waitFor(String eventName,
Boolean includeEvent,
Integer timeout)
This method waits for the given event's dependencies and the event itself (if desired) to be marked as satisfied in
the event server.
|
void |
waitFor(String eventName,
Integer timeout)
This method waits for the given event's dependencies to be marked as satisfied in the event server.
|
void |
waitForRunSequenceCompletion()
This method waits indefinitely for the run sequence to be enforced completely, and then returns.
|
void |
waitForRunSequenceCompletion(Integer timeout)
This method waits for the run sequence to be enforced completely, and then returns.
|
void |
waitForRunSequenceCompletion(Integer timeout,
Integer nextEventReceiptTimeout)
This method waits for the run sequence to be enforced completely, and then returns.
|
void killNode(String nodeName) throws RuntimeEngineException
nodeName
- the node name to be killedRuntimeEngineException
- is something goes wrongNodeNotFoundException
- if the node doesn't existvoid stopNode(String nodeName, Integer secondsUntilForcedStop) throws RuntimeEngineException
nodeName
- the node name to be StoppedsecondsUntilForcedStop
- the number of seconds to wait until forcing a stopRuntimeEngineException
- is something goes wrongNodeNotFoundException
- if the node doesn't existvoid startNode(String nodeName) throws RuntimeEngineException
nodeName
- the node name to be startedRuntimeEngineException
- is something goes wrongNodeNotFoundException
- if the node doesn't existvoid restartNode(String nodeName, Integer secondsUntilForcedStop) throws RuntimeEngineException
nodeName
- the node name to be restartedsecondsUntilForcedStop
- the number of seconds to wait until forcing a stopRuntimeEngineException
- is something goes wrongNodeNotFoundException
- if the node doesn't existvoid clockDrift(String nodeName, Integer amount) throws RuntimeEngineException
nodeName
- the node name to apply the clock drift onamount
- the positive or negative amount of time offset to apply in millisecondsRuntimeEngineException
- is something goes wrongNodeNotFoundException
- if the node doesn't existvoid networkPartition(NetPart netPart) throws RuntimeEngineException
netPart
- the desired scheme for the partition. Take a look at NetPart
class for more informationRuntimeEngineException
- if something goes wrongNodeNotFoundException
- if one of partitions includes a node that doesn't existvoid networkOperation(String nodeName, NetOp.BuilderBase... netOpBuilder) throws RuntimeEngineException
netOpBuilder
- the specifics of the network operation. Take a look a NetOp
class for more information.
NetOp
static methods should be used to create objects of this type.nodeName
- the node to apply the network operation onRuntimeEngineException
- if something goes wrongvoid removeNetworkPartition(NetPart netPart) throws RuntimeEngineException
RuntimeEngineException
CommandResults runCommandInNode(String nodeName, String command) throws RuntimeEngineException
nodeName
- the node name to execute the shell command intocommand
- the command to be executedRuntimeEngineException
- if something goes wrongNodeIsNotRunningException
- if the node is not runningNodeNotFoundException
- if the node doesn't existString ip(String nodeName)
nodeName
- the node name to find ip address forInteger portMapping(String nodeName, Integer portNumber, PortType portType)
nodeName
- the node nameportNumber
- the source port numberportType
- tcp or udpvoid waitFor(String eventName) throws RuntimeEngineException
eventName
- the event name to wait forRuntimeEngineException
- if something goes wrong or the event name is not referred to in the run sequencevoid waitFor(String eventName, Boolean includeEvent) throws RuntimeEngineException
eventName
- the event name to wait forincludeEvent
- if the wait should include the event itself or notRuntimeEngineException
- if something goes wrong or the event name is not referred to in the run sequencevoid waitFor(String eventName, Integer timeout) throws RuntimeEngineException, TimeoutException
eventName
- the event name to wait fortimeout
- the timeout amount in secondsRuntimeEngineException
- if something goes wrong or the event name is not referred to in the run sequenceTimeoutException
- if the wait timeoutsvoid waitFor(String eventName, Boolean includeEvent, Integer timeout) throws RuntimeEngineException, TimeoutException
eventName
- the event name to wait forincludeEvent
- if the wait should include the event itself or nottimeout
- the timeout amount in secondsRuntimeEngineException
- if something goes wrong or the event name is not referred to in the run sequenceTimeoutException
- if the wait timeoutsvoid enforceOrder(String eventName, FailifyCheckedRunnable action) throws RuntimeEngineException
eventName
- the event name to wait foraction
- the action to execute after waiting is completedRuntimeEngineException
- if something goes wrong or the event name is not referred to in the run sequence
or the event is not a test case eventvoid enforceOrder(String eventName, Integer timeout, FailifyCheckedRunnable action) throws RuntimeEngineException, TimeoutException
eventName
- the event name to wait fortimeout
- the timeout amount in secondsaction
- the action to execute after waiting is completedRuntimeEngineException
- if something goes wrong or the event name is not referred to in the run sequence
or the event is not a test case eventTimeoutException
- if the wait timeoutsvoid waitForRunSequenceCompletion() throws TimeoutException
TimeoutException
- if either type of timeout happensvoid waitForRunSequenceCompletion(Integer timeout) throws TimeoutException
timeout
- the waiting timeout in secondsTimeoutException
- if either type of timeout happensvoid waitForRunSequenceCompletion(Integer timeout, Integer nextEventReceiptTimeout) throws TimeoutException
timeout
- the waiting timeout in secondsnextEventReceiptTimeout
- the number of seconds to wait until timeout the receipt of the next event in the
run sequenceTimeoutException
- if either type of timeout happensCopyright © 2019. All rights reserved.