Class FilibusterConfiguration
- java.lang.Object
-
- cloud.filibuster.junit.configuration.FilibusterConfiguration
-
public class FilibusterConfiguration extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FilibusterConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FilibusterServerBackend
backendToBackendClass(java.lang.Class<? extends FilibusterServerBackend> clazz)
boolean
getAbortOnFirstFailure()
Should abort on first failure?boolean
getAvoidInjectionsOnOrganicFailures()
Do we avoid injections on failing RPCs?boolean
getAvoidRedundantInjections()
Do we avoid redundant injections?java.lang.String
getClassName()
boolean
getDataNondeterminism()
Does the current configuration contain data nondeterminism?boolean
getDegradeWhenServerInitializationFails()
Should the jUnit suite degrade and run the tests without faults only when the server is unavailable?java.lang.String
getDockerImageName()
Name of the docker image containing the Filibuster server.boolean
getDynamicReduction()
Should dynamic reduction be used?java.lang.Class<? extends java.lang.Throwable>
getExpected()
Return expected exception.boolean
getFailIfFaultInjectionMismatch()
Fail the test if a fault injected doesn't match the fault surfaced.boolean
getFailIfFaultNotInjected()
Fail the test if a fault is not injected.boolean
getFailIfFaultNotInjectedAndATrackedMethodIsInvoked()
Fail the test if a fault is not injected and a tracked method is invoked.boolean
getFailOnOrganicFailures()
Do we fail on failing RPCs?java.lang.Class<? extends FilibusterFaultInjectionFilter>
getFaultInjectionFilter()
Return fault injection filter.FilibusterLatencyProfile
getLatencyProfile()
Which latency profile should Filibuster use?FilibusterSearchStrategy
getSearchStrategy()
Which search strategy should Filibuster use?FilibusterServerBackend
getServerBackend()
Return the backend implementation that should be used for running the Filibuster server.ServiceProfileBehavior
getServiceProfileBehavior()
How should service profiles be used?java.util.List<ServiceProfile>
getServiceProfiles()
What service profiles should Filibuster use?boolean
getSuppressCombinations()
Should combinations of faults be suppressed?java.lang.String
getTestName()
org.json.JSONObject
readAnalysisFile()
Returns the analysis file content as JSON, read from either file or annotation-based configuration.java.util.List<java.lang.String>
toExecutableCommand()
Generate executable command to run Filibuster given the current configuration.
-
-
-
Method Detail
-
backendToBackendClass
public static FilibusterServerBackend backendToBackendClass(java.lang.Class<? extends FilibusterServerBackend> clazz)
-
getServerBackend
public FilibusterServerBackend getServerBackend()
Return the backend implementation that should be used for running the Filibuster server.- Returns:
- server backend.
-
getExpected
public java.lang.Class<? extends java.lang.Throwable> getExpected()
Return expected exception.- Returns:
- throwable
-
getFaultInjectionFilter
public java.lang.Class<? extends FilibusterFaultInjectionFilter> getFaultInjectionFilter()
Return fault injection filter.- Returns:
- fault injection filter
-
getDockerImageName
public java.lang.String getDockerImageName()
Name of the docker image containing the Filibuster server.- Returns:
- string
-
getDataNondeterminism
public boolean getDataNondeterminism()
Does the current configuration contain data nondeterminism?- Returns:
- boolean
-
getAvoidRedundantInjections
public boolean getAvoidRedundantInjections()
Do we avoid redundant injections?- Returns:
- boolean
-
getAvoidInjectionsOnOrganicFailures
public boolean getAvoidInjectionsOnOrganicFailures()
Do we avoid injections on failing RPCs?- Returns:
- boolean
-
getFailOnOrganicFailures
public boolean getFailOnOrganicFailures()
Do we fail on failing RPCs?- Returns:
- boolean
-
getDynamicReduction
public boolean getDynamicReduction()
Should dynamic reduction be used?- Returns:
- boolean
-
getAbortOnFirstFailure
public boolean getAbortOnFirstFailure()
Should abort on first failure?- Returns:
- boolean
-
getSuppressCombinations
public boolean getSuppressCombinations()
Should combinations of faults be suppressed?- Returns:
- boolean
-
getSearchStrategy
public FilibusterSearchStrategy getSearchStrategy()
Which search strategy should Filibuster use?- Returns:
- search strategy.
-
getLatencyProfile
public FilibusterLatencyProfile getLatencyProfile()
Which latency profile should Filibuster use?- Returns:
- latency profile
-
getTestName
public java.lang.String getTestName()
-
getServiceProfiles
public java.util.List<ServiceProfile> getServiceProfiles()
What service profiles should Filibuster use?- Returns:
- service profiles
-
getFailIfFaultNotInjected
public boolean getFailIfFaultNotInjected()
Fail the test if a fault is not injected.- Returns:
- whether test should fail.
-
getFailIfFaultInjectionMismatch
public boolean getFailIfFaultInjectionMismatch()
Fail the test if a fault injected doesn't match the fault surfaced.- Returns:
- whether test should fail.
-
getFailIfFaultNotInjectedAndATrackedMethodIsInvoked
public boolean getFailIfFaultNotInjectedAndATrackedMethodIsInvoked()
Fail the test if a fault is not injected and a tracked method is invoked.- Returns:
- whether service should fail.
-
getServiceProfileBehavior
public ServiceProfileBehavior getServiceProfileBehavior()
How should service profiles be used?- Returns:
- service profile behavior
-
getDegradeWhenServerInitializationFails
public boolean getDegradeWhenServerInitializationFails()
Should the jUnit suite degrade and run the tests without faults only when the server is unavailable?- Returns:
- boolean
-
readAnalysisFile
public org.json.JSONObject readAnalysisFile() throws java.io.IOException
Returns the analysis file content as JSON, read from either file or annotation-based configuration.- Returns:
- json object.
- Throws:
java.io.FileNotFoundException
- when the analysis file cannot be found.java.io.IOException
-
toExecutableCommand
public java.util.List<java.lang.String> toExecutableCommand()
Generate executable command to run Filibuster given the current configuration.- Returns:
- executable command with options.
-
getClassName
public java.lang.String getClassName()
-
-