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 classFilibusterConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FilibusterServerBackendbackendToBackendClass(java.lang.Class<? extends FilibusterServerBackend> clazz)booleangetAbortOnFirstFailure()Should abort on first failure?booleangetAvoidInjectionsOnOrganicFailures()Do we avoid injections on failing RPCs?booleangetAvoidRedundantInjections()Do we avoid redundant injections?java.lang.StringgetClassName()booleangetDataNondeterminism()Does the current configuration contain data nondeterminism?booleangetDegradeWhenServerInitializationFails()Should the jUnit suite degrade and run the tests without faults only when the server is unavailable?java.lang.StringgetDockerImageName()Name of the docker image containing the Filibuster server.booleangetDynamicReduction()Should dynamic reduction be used?java.lang.Class<? extends java.lang.Throwable>getExpected()Return expected exception.booleangetFailIfFaultInjectionMismatch()Fail the test if a fault injected doesn't match the fault surfaced.booleangetFailIfFaultNotInjected()Fail the test if a fault is not injected.booleangetFailIfFaultNotInjectedAndATrackedMethodIsInvoked()Fail the test if a fault is not injected and a tracked method is invoked.booleangetFailOnOrganicFailures()Do we fail on failing RPCs?java.lang.Class<? extends FilibusterFaultInjectionFilter>getFaultInjectionFilter()Return fault injection filter.FilibusterLatencyProfilegetLatencyProfile()Which latency profile should Filibuster use?FilibusterSearchStrategygetSearchStrategy()Which search strategy should Filibuster use?FilibusterServerBackendgetServerBackend()Return the backend implementation that should be used for running the Filibuster server.ServiceProfileBehaviorgetServiceProfileBehavior()How should service profiles be used?java.util.List<ServiceProfile>getServiceProfiles()What service profiles should Filibuster use?booleangetSuppressCombinations()Should combinations of faults be suppressed?java.lang.StringgetTestName()org.json.JSONObjectreadAnalysisFile()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.IOExceptionReturns 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()
-
-