@Override
    public void prePut(final ObserverContext<? extends RegionCoprocessorEnvironment> e,
      final Put put, final WALEdit edit, final Durability durability) throws IOException {
      Threads.sleep(sleepTime.get());
      if (ct.incrementAndGet() == 1) {
        throw new IOException("first call I fail");
      }
    }
This copro sleeps 20 second. The first call it fails. The second time, it works.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/AbstractTestCITimeout.java