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 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 Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TestInjection.TestShutdownFailError`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `failReplicaRequests`
    `static String` | `failUpdateRequests`
    `static String` | `nonExistentCoreExceptionAfterUnload`
    `static String` | `nonGracefullClose`
    `static String` | `randomDelayInCoreCreation`
    `static int` | `randomDelayMaxInCoreCreationInSec`
    `static String` | `splitFailureBeforeReplicaCreation`
    `static String` | `updateLogReplayRandomPause`
    `static String` | `updateRandomPause`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestInjection()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `injectFailReplicaRequests()`
    `static boolean` | `injectFailUpdateRequests()`
    `static boolean` | `injectNonExistentCoreExceptionAfterUnload(String cname)`
    `static boolean` | `injectNonGracefullClose(CoreContainer cc)`
    `static boolean` | `injectRandomDelayInCoreCreation()`
    `static boolean` | `injectSplitFailureBeforeReplicaCreation()`
    `static boolean` | `injectUpdateLogReplayRandomPause()`
    `static boolean` | `injectUpdateRandomPause()`
    `static void` | `reset()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### nonGracefullClose

          public static String nonGracefullClose

    - #### failReplicaRequests

          public static String failReplicaRequests

    - #### failUpdateRequests

          public static String failUpdateRequests

    - #### nonExistentCoreExceptionAfterUnload

          public static String nonExistentCoreExceptionAfterUnload

    - #### updateLogReplayRandomPause

          public static String updateLogReplayRandomPause

    - #### updateRandomPause

          public static String updateRandomPause

    - #### randomDelayInCoreCreation

          public static String randomDelayInCoreCreation

    - #### randomDelayMaxInCoreCreationInSec

          public static int randomDelayMaxInCoreCreationInSec

    - #### splitFailureBeforeReplicaCreation

          public static String splitFailureBeforeReplicaCreation

  - ### Constructor Detail

    - #### TestInjection

          public TestInjection()

  - ### Method Detail

    - #### reset

          public static void reset()

    - #### 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()

    - #### injectSplitFailureBeforeReplicaCreation

          public static boolean injectSplitFailureBeforeReplicaCreation()

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.