@Override
    public void onRollbackFailure(GlobalTransaction tx, Throwable originalException) {
        LOGGER.warn("Failed to rollback transaction[" + tx.getXid() + "]", originalException);
        TIMER.newTimeout(new CheckTimerTask(tx, GlobalStatus.Rollbacked), SCHEDULE_INTERVAL_SECONDS, TimeUnit.SECONDS);
    }
@Test
    void onRollbackFailure() throws Exception {


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

        // get timer
        Class<?> c = Class.forName("org.apache.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.Rollbacked;
        Thread.sleep(25*1000L);
        pendingTimeout = timer.pendingTimeouts();
        LOGGER.info("pendingTimeout {}" ,pendingTimeout);
        //all timer is done
        Assertions.assertEquals(pendingTimeout,0L);


    }