Class 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 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.
    • Field Detail

      • nonGracefullClose

        public static volatile String nonGracefullClose
      • failReplicaRequests

        public static volatile String failReplicaRequests
      • failUpdateRequests

        public static volatile String failUpdateRequests
      • leaderTragedy

        public static volatile String leaderTragedy
      • 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
      • directUpdateLatch

        public static volatile CountDownLatch directUpdateLatch
      • reindexFailure

        public static volatile String reindexFailure
      • failIndexFingerprintRequests

        public static volatile String failIndexFingerprintRequests
      • wrongIndexFingerprint

        public static volatile String wrongIndexFingerprint
      • delayBeforeFollowerCommitRefresh

        public static volatile Integer delayBeforeFollowerCommitRefresh
      • delayInExecutePlanAction

        public static volatile Integer delayInExecutePlanAction
      • delayBeforeCreatingNewDocSet

        public static volatile Integer delayBeforeCreatingNewDocSet
      • countDocSetDelays

        public static volatile AtomicInteger countDocSetDelays
      • failInExecutePlanAction

        public static volatile boolean failInExecutePlanAction
      • uifOutOfMemoryError

        public static volatile boolean uifOutOfMemoryError
    • Constructor Detail

      • TestInjection

        public TestInjection()
    • 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()
      • injectLeaderTragedy

        public static boolean injectLeaderTragedy​(SolrCore core)
      • 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()
      • injectDirectUpdateLatch

        public static boolean injectDirectUpdateLatch()
      • injectReindexFailure

        public static boolean injectReindexFailure()
      • injectReindexLatch

        public static boolean injectReindexLatch()
      • injectDelayBeforeFollowerCommitRefresh

        public static boolean injectDelayBeforeFollowerCommitRefresh()
      • injectUIFOutOfMemoryError

        public static boolean injectUIFOutOfMemoryError()
      • injectDocSetDelay

        public static boolean injectDocSetDelay​(Object query)
      • injectSearcherHooks

        public static boolean injectSearcherHooks​(String collectionName)