@Override
    public void onCommitFailure(GlobalTransaction tx, Throwable cause) {
        LOGGER.warn("Failed to commit transaction[" + tx.getXid() + "]", cause);
        TIMER.newTimeout(new DefaultFailureHandlerImpl.CheckTimerTask(tx, GlobalStatus.Committed),
            SCHEDULE_INTERVAL_SECONDS, TimeUnit.SECONDS);
    }
@Test
    void onCommitFailure() throws Exception{

        RootContext.bind(DEFAULT_XID);
        DefaultGlobalTransaction tx = (DefaultGlobalTransaction)GlobalTransactionContext.getCurrentOrCreate();
        FailureHandler failureHandler = new DefaultFailureHandlerImpl();
        failureHandler.onCommitFailure(tx, new MyRuntimeException("").getCause());

        // get timer
        Class<?> c = Class.forName("io.seata.tm.api.DefaultFailureHandlerImpl");
        Field field = c.getDeclaredField("TIMER");
        field.setAccessible(true);
        HashedWheelTimer timer = (HashedWheelTimer) field.get(failureHandler);
        // assert timer pendingCount: first time is 1
        Long pendingTimeout = timer.pendingTimeouts();
        Assertions.assertEquals(pendingTimeout,1L);
        //set globalStatus
        globalStatus= GlobalStatus.Committed;
        Thread.sleep(25*1000L);
        pendingTimeout = timer.pendingTimeouts();
        LOGGER.info("pendingTimeout {}" ,pendingTimeout);
        //all timer is done
        Assertions.assertEquals(pendingTimeout,0L);
    }