PluginServiceTest.java 文件源码

java
阅读 43 收藏 0 点赞 0 评论 0

项目:flow-platform 作者:
@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());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号