Package org.apache.solr.util
Class TestInjection
- java.lang.Object
-
- org.apache.solr.util.TestInjection
-
public class TestInjection extends Object
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 unlessLuceneTestCase
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 Classes Modifier and Type Class Description static interface
TestInjection.Hook
static class
TestInjection.TestShutdownFailError
-
Field Summary
Fields Modifier and Type Field Description static Integer
delayBeforeSlaveCommitRefresh
static String
failIndexFingerprintRequests
static String
failReplicaRequests
static String
failUpdateRequests
static String
nonExistentCoreExceptionAfterUnload
static String
nonGracefullClose
static String
prepRecoveryOpPauseForever
static String
randomDelayInCoreCreation
static int
randomDelayMaxInCoreCreationInSec
static String
reindexFailure
static CountDownLatch
reindexLatch
static String
splitFailureAfterReplicaCreation
static String
splitFailureBeforeReplicaCreation
static CountDownLatch
splitLatch
static boolean
uifOutOfMemoryError
static String
updateLogReplayRandomPause
static String
updateRandomPause
static String
wrongIndexFingerprint
-
Constructor Summary
Constructors Constructor Description TestInjection()
-
Method Summary
-
-
-
Field Detail
-
nonGracefullClose
public static volatile String nonGracefullClose
-
failReplicaRequests
public static volatile String failReplicaRequests
-
failUpdateRequests
public static volatile String failUpdateRequests
-
nonExistentCoreExceptionAfterUnload
public static volatile String nonExistentCoreExceptionAfterUnload
-
updateLogReplayRandomPause
public static volatile String updateLogReplayRandomPause
-
updateRandomPause
public static volatile String updateRandomPause
-
prepRecoveryOpPauseForever
public static volatile String prepRecoveryOpPauseForever
-
randomDelayInCoreCreation
public static volatile String randomDelayInCoreCreation
-
randomDelayMaxInCoreCreationInSec
public static volatile int randomDelayMaxInCoreCreationInSec
-
splitFailureBeforeReplicaCreation
public static volatile String splitFailureBeforeReplicaCreation
-
splitFailureAfterReplicaCreation
public static volatile String splitFailureAfterReplicaCreation
-
splitLatch
public static volatile CountDownLatch splitLatch
-
reindexLatch
public static volatile CountDownLatch reindexLatch
-
reindexFailure
public static volatile String reindexFailure
-
failIndexFingerprintRequests
public static volatile String failIndexFingerprintRequests
-
wrongIndexFingerprint
public static volatile String wrongIndexFingerprint
-
delayBeforeSlaveCommitRefresh
public static volatile Integer delayBeforeSlaveCommitRefresh
-
uifOutOfMemoryError
public static volatile boolean uifOutOfMemoryError
-
-
Method Detail
-
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
public static boolean injectNonGracefullClose(CoreContainer cc)
-
injectFailReplicaRequests
public static boolean injectFailReplicaRequests()
-
injectFailUpdateRequests
public static boolean injectFailUpdateRequests()
-
injectNonExistentCoreExceptionAfterUnload
public static boolean injectNonExistentCoreExceptionAfterUnload(String cname)
-
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()
-
injectReindexFailure
public static boolean injectReindexFailure()
-
injectReindexLatch
public static boolean injectReindexLatch()
-
injectDelayBeforeSlaveCommitRefresh
public static boolean injectDelayBeforeSlaveCommitRefresh()
-
injectUIFOutOfMemoryError
public static boolean injectUIFOutOfMemoryError()
-
newSearcherHook
public static boolean newSearcherHook(TestInjection.Hook hook)
-
injectSearcherHooks
public static boolean injectSearcherHooks(String collectionName)
-
-