@Test
    public void testTriggerTimePoint() throws InterruptedException {
        String test = System.getProperty("AlarmCoreTest");
        if (test == null) {
            return;
        }

        Rules emptyRules = new Rules();
        emptyRules.setRules(new ArrayList<>(0));
        AlarmCore core = new AlarmCore(new AlarmRulesWatcher(emptyRules, null, null));

        Map<String, List<RunningRule>> runningContext = Whitebox.getInternalState(core, "runningContext");

        List<RunningRule> rules = new ArrayList<>(1);
        RunningRule mockRule = mock(RunningRule.class);

        List<LocalDateTime> checkTime = new LinkedList<>();
        final boolean[] isAdd = {true};

        doAnswer((Answer<Object>) mock -> {
            if (isAdd[0]) {
                checkTime.add(LocalDateTime.now());
            }
            return new ArrayList<>(0);
        }).when(mockRule).check();

        rules.add(mockRule);
        runningContext.put("mock", rules);

        core.start(new ArrayList<>(0));

        for (int i = 0; i < 10; i++) {
            Thread.sleep(60 * 1000L);
            if (checkTime.size() >= 3) {
                isAdd[0] = false;
                Assertions.assertTrue(checkTimePoints(checkTime));
                break;
            }
            if (i == 9) {
                Assertions.assertTrue(false);
            }
        }
    }
This case will cost several minutes, which causes CI very slow, so it only runs when -DAlarmCoreTest=true
existed.
oap-server/server-alarm-plugin/src/test/java/org/apache/skywalking/oap/server/core/alarm/provider/AlarmCoreTest.java