Class GenericTestUtils.SleepAnswer

java.lang.Object
org.apache.hadoop.hbase.GenericTestUtils.SleepAnswer
All Implemented Interfaces:
org.mockito.stubbing.Answer<Object>
Enclosing class:
GenericTestUtils

public static class GenericTestUtils.SleepAnswer extends Object implements org.mockito.stubbing.Answer<Object>
An Answer implementation which sleeps for a random number of milliseconds between 0 and a configurable value before delegating to the real implementation of the method. This can be useful for drawing out race conditions.
  • Field Details

  • Constructor Details

  • Method Details

    • answer

      public Object answer(org.mockito.invocation.InvocationOnMock invocation) throws Throwable
      Specified by:
      answer in interface org.mockito.stubbing.Answer<Object>
      Throws:
      Throwable