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
      • 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
      • delayBeforeSlaveCommitRefresh

        public static volatile Integer delayBeforeSlaveCommitRefresh
      • delayInExecutePlanAction

        public static volatile Integer delayInExecutePlanAction
      • 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()
      • 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()
      • injectDelayBeforeSlaveCommitRefresh

        public static boolean injectDelayBeforeSlaveCommitRefresh()
      • injectUIFOutOfMemoryError

        public static boolean injectUIFOutOfMemoryError()
      • injectSearcherHooks

        public static boolean injectSearcherHooks​(String collectionName)