AlarmControlHandler supplement test cases (#786)

pull/789/head
Lijx 2 years ago committed by GitHub
parent 9534d970ea
commit e1f2e78c1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,14 +38,4 @@ public class AlarmControlHandlerTest {
alarmControlHandler.initCacheAndLock("1", "Wechat", 1);
Assert.assertTrue(alarmControlHandler.isSendAlarm(alarmControlDTO));
}
@Test
public void assertExpireAfterSendAlarm() throws InterruptedException {
AlarmControlHandler alarmControlHandler = new AlarmControlHandler();
AlarmControlDTO alarmControlDTO = new AlarmControlDTO("1", "Wechat", NotifyTypeEnum.ACTIVITY);
alarmControlHandler.initCacheAndLock("1", "Wechat", 1);
alarmControlHandler.isSendAlarm(alarmControlDTO);
Thread.sleep(60 * 1000);
Assert.assertTrue(alarmControlHandler.isSendAlarm(alarmControlDTO));
}
}

Loading…
Cancel
Save