### Question:
DefaultFailureHandlerImpl implements FailureHandler { @Override public void onCommitFailure(GlobalTransaction tx, Throwable cause) { LOGGER.warn("Failed to commit transaction[" + tx.getXid() + "]", cause); timer.newTimeout(new CheckTimerTask(tx, GlobalStatus.Committed), SCHEDULE_INTERVAL_SECONDS, TimeUnit.SECONDS); }  @Override void onBeginFailure(GlobalTransaction tx, Throwable cause); @Override void onCommitFailure(GlobalTransaction tx, Throwable cause); @Override void onRollbackFailure(GlobalTransaction tx, Throwable originalException); @Override void onRollbackRetrying(GlobalTransaction tx, Throwable originalException);  }### Answer:
@Test void onCommitFailure() throws Exception{ RootContext.bind(DEFAULT_XID); GlobalTransaction tx = GlobalTransactionContext.getCurrentOrCreate(); FailureHandler failureHandler = new DefaultFailureHandlerImpl(); failureHandler.onCommitFailure(tx, new MyRuntimeException("").getCause()); Class<?> c = Class.forName("io.seata.tm.api.DefaultFailureHandlerImpl"); Field field = c.getDeclaredField("timer"); field.setAccessible(true); HashedWheelTimer timer = (HashedWheelTimer) field.get(failureHandler); Long pendingTimeout = timer.pendingTimeouts(); Assertions.assertEquals(pendingTimeout,1L); globalStatus= GlobalStatus.Committed; Thread.sleep(25*1000L); pendingTimeout = timer.pendingTimeouts(); LOGGER.info("pendingTimeout {}" ,pendingTimeout); Assertions.assertEquals(pendingTimeout,0L); }