@Test
public void should_stop_success_demo_first() throws Throwable {
cleanFolder("flowCliE");
CountDownLatch countDownLatch = new CountDownLatch(1);
applicationEventMulticaster.addApplicationListener((ApplicationListener<PluginStatusChangeEvent>) event -> {
if (ImmutableMultiset.of(PluginStatus.INSTALLING).contains(event.getPluginStatus())) {
countDownLatch.countDown();
}
});
pluginService.install("flowCliE");
countDownLatch.await(30, TimeUnit.SECONDS);
pluginService.stop("flowCliE");
Plugin plugin = pluginDao.get("flowCliE");
Assert.assertEquals(PluginStatus.PENDING, plugin.getStatus());
Assert.assertEquals(false, plugin.getStopped());
}
PluginServiceTest.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:flow-platform
作者:
评论列表
文章目录