Package org.apache.solr.util
Class TestInjection
java.lang.Object
org.apache.solr.util.TestInjection
Allows random faults to be injected in running code during test runs.
Set static strings to "true" or "false" or "true:60" for true 60% of the time.
All methods are No-Ops unless LuceneTestCase is loadable via the ClassLoader used
to load this class. LuceneTestCase.random() is used as the source of all entropy.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic AtomicIntegerstatic AtomicIntegerstatic Integerstatic Integerstatic Integerstatic CountDownLatchstatic Stringstatic booleanstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic QueryLimitstatic Stringstatic intstatic Stringstatic CountDownLatchstatic booleanDefaults tofalse, If set totrue, theninjectSkipIndexWriterCommitOnClose(java.lang.Object)will returntruestatic Stringstatic Stringstatic CountDownLatchstatic booleanstatic Stringstatic Stringstatic String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic booleanstatic booleanstatic booleaninjectDocSetDelay(Object query) static booleanstatic booleanstatic booleanstatic booleaninjectLeaderTragedy(SolrCore core) static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleaninjectSearcherHooks(String collectionName) static booleaninjectSkipIndexWriterCommitOnClose(Object indexWriter) Returns the value ofskipIndexWriterCommitOnClose.static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic voidstatic booleanstatic voidstatic voidreset()
-
Field Details
-
nonGracefullClose
-
failReplicaRequests
-
failUpdateRequests
-
leaderTragedy
-
nonExistentCoreExceptionAfterUnload
-
updateLogReplayRandomPause
-
updateRandomPause
-
prepRecoveryOpPauseForever
-
randomDelayInCoreCreation
-
randomDelayMaxInCoreCreationInSec
public static volatile int randomDelayMaxInCoreCreationInSec -
splitFailureBeforeReplicaCreation
-
splitFailureAfterReplicaCreation
-
splitLatch
-
directUpdateLatch
-
reindexLatch
-
reindexFailure
-
failIndexFingerprintRequests
-
wrongIndexFingerprint
-
delayBeforeFollowerCommitRefresh
-
delayInExecutePlanAction
-
delayBeforeCreatingNewDocSet
-
countDocSetDelays
-
queryTimeout
-
failInExecutePlanAction
public static volatile boolean failInExecutePlanAction -
cpuTimerDelayInjectedNS
-
skipIndexWriterCommitOnClose
public static volatile boolean skipIndexWriterCommitOnCloseDefaults tofalse, If set totrue, theninjectSkipIndexWriterCommitOnClose(java.lang.Object)will returntrue- See Also:
-
uifOutOfMemoryError
public static volatile boolean uifOutOfMemoryError
-
-
Constructor Details
-
TestInjection
public TestInjection()
-
-
Method Details
-
notifyPauseForeverDone
public static void notifyPauseForeverDone() -
reset
public static void reset() -
injectWrongIndexFingerprint
public static boolean injectWrongIndexFingerprint() -
injectFailIndexFingerprintRequests
public static boolean injectFailIndexFingerprintRequests() -
injectRandomDelayInCoreCreation
public static boolean injectRandomDelayInCoreCreation() -
injectNonGracefullClose
-
injectSkipIndexWriterCommitOnClose
Returns the value ofskipIndexWriterCommitOnClose.- Parameters:
indexWriter- used only for logging- See Also:
-
injectFailReplicaRequests
public static boolean injectFailReplicaRequests() -
injectFailUpdateRequests
public static boolean injectFailUpdateRequests() -
injectLeaderTragedy
-
injectNonExistentCoreExceptionAfterUnload
-
injectUpdateLogReplayRandomPause
public static boolean injectUpdateLogReplayRandomPause() -
injectUpdateRandomPause
public static boolean injectUpdateRandomPause() -
injectPrepRecoveryOpPauseForever
public static boolean injectPrepRecoveryOpPauseForever() -
injectSplitFailureBeforeReplicaCreation
public static boolean injectSplitFailureBeforeReplicaCreation() -
injectSplitFailureAfterReplicaCreation
public static boolean injectSplitFailureAfterReplicaCreation() -
injectSplitLatch
public static boolean injectSplitLatch() -
injectDirectUpdateLatch
public static boolean injectDirectUpdateLatch() -
measureCpu
public static void measureCpu() -
injectCpuUseInSearcherCpuLimitCheck
public static void injectCpuUseInSearcherCpuLimitCheck() -
injectReindexFailure
public static boolean injectReindexFailure() -
injectReindexLatch
public static boolean injectReindexLatch() -
injectDelayBeforeFollowerCommitRefresh
public static boolean injectDelayBeforeFollowerCommitRefresh() -
injectUIFOutOfMemoryError
public static boolean injectUIFOutOfMemoryError() -
injectDocSetDelay
-
newSearcherHook
-
injectSearcherHooks
-