• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AfterSuite类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jboss.arquillian.test.spi.event.suite.AfterSuite的典型用法代码示例。如果您正苦于以下问题:Java AfterSuite类的具体用法?Java AfterSuite怎么用?Java AfterSuite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AfterSuite类属于org.jboss.arquillian.test.spi.event.suite包,在下文中一共展示了AfterSuite类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: stopNodesForSuite

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
/**
 * Removes nodes created on suite level and destroys provider listed in "arquillian.suite.destroy.providers" cloud property.
 */
public void stopNodesForSuite(@Observes AfterSuite event, ContainerRegistry registry, CloudsRegistry cloudsRegistry)
        throws LifecycleException {
    try {
        final Set<String> nodeNameSet = new HashSet<>();
        processSuiteLeveNodes(nodeProperties -> {
            LOGGER.debug("WildFly container {}  will be destroyed", nodeProperties.getName());
            nodeNameSet.add(nodeProperties.getName());
            if (nodeProperties.getPropertyAsBoolean(ArquillianConfig.Node.CONTAINER_REGISTER, false)) {
                try {
                    cloudsRegistry.stopWildFlyContainerInRegistry(nodeProperties.getName(), registry,
                            containerContext.get());
                } catch (Exception e) {
                    throw new RuntimeException("Stopping WildFly container failed", e);
                }
            }

        });
        cloudsRegistry.cleanupNodes(node -> nodeNameSet.contains(node.getName()));
    } finally {
        iterateSuiteCsvProperty(ArquillianConfig.Suite.DESTROY_PROVIDERS, cloudsRegistry::destroyProvider);
    }
}
 
开发者ID:wildfly-extras,项目名称:sunstone,代码行数:26,代码来源:SunstoneObserver.java


示例2: startBeforeSuiteTrueTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void startBeforeSuiteTrueTest() throws Exception {

    Mockito.when(configuration.getStartBeforeSuite()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new After(DummyTestCase.class, DummyTestCase.class.getMethod("test")));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordSuiteVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordSuiteVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:26,代码来源:RecorderLifecycleObserverTestCase.java


示例3: startBeforeClassTrueTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void startBeforeClassTrueTest() throws Exception {

    Mockito.when(configuration.getStartBeforeClass()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordClassVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordClassVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:26,代码来源:RecorderLifecycleObserverTestCase.java


示例4: startBeforeTestTrueTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void startBeforeTestTrueTest() throws Exception {

    Mockito.when(configuration.getStartBeforeTest()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:26,代码来源:RecorderLifecycleObserverTestCase.java


示例5: shouldStopAndDestroyAutoContainers

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void shouldStopAndDestroyAutoContainers() {

    Map<String, String> dockerData = new HashMap<String, String>();
    dockerData.put("autoStartContainers", "a,b");
    dockerData.put("dockerContainers", "a:\n  image: a\nb:\n  image: a\n");

    CubeConfiguration cubeConfiguration = CubeConfiguration.fromMap(new HashMap<String, String>());
    bind(ApplicationScoped.class, CubeConfiguration.class, cubeConfiguration);

    CubeDockerConfiguration dockerConfiguration = CubeDockerConfiguration.fromMap(dockerData, null);
    bind(ApplicationScoped.class, CubeDockerConfiguration.class, dockerConfiguration);

    fire(new AfterSuite());

    assertEventFired(StopCube.class, 2);
    assertEventFired(DestroyCube.class, 2);
    assertEventFiredOnOtherThread(StopCube.class);
    assertEventFiredOnOtherThread(DestroyCube.class);
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:21,代码来源:CubeSuiteLifecycleControllerTest.java


示例6: stopTestSuite

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void stopTestSuite(@Observes(precedence = Integer.MIN_VALUE) AfterSuite event) {

        Reporter
            .createReport(new TestSuiteReport(TEST_SUITE_NAME))
            .stop()
            .inSection(new TestSuiteSection(DEFAULT_TEST_SUITE_ID))
            .fire(sectionEvent);
    }
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:9,代码来源:ArquillianCoreReporterLifecycleManager.java


示例7: unsetProperties

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void unsetProperties(@Observes AfterSuite event) {
	Properties props = load(SystemProperties.FILE_NAME);
	if (props != null) {
		for (Map.Entry<Object, Object> entry : props.entrySet()) {
			System.clearProperty(entry.getKey().toString());
		}
	}
}
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:9,代码来源:SystemPropertiesLoader.java


示例8: stopPumbaContainer

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void stopPumbaContainer(@Observes AfterSuite afterSuite) {
    final Cube<?> cube = cubeRegistryInstance.get().getCube(StandaloneContainer.Builder.DEFAULT_NAME);
    if (cube != null) {
        if (cube.state() != Cube.State.STOPPED && cube.state() != Cube.State.DESTROYED) {
            cubeControllerInstance.get().stop(StandaloneContainer.Builder.DEFAULT_NAME);
            cubeControllerInstance.get().destroy(StandaloneContainer.Builder.DEFAULT_NAME);
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-cube-q,代码行数:10,代码来源:QContainerChaosPumbaStopper.java


示例9: on

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void on(@Observes AfterSuite event, JiraGovernorClient jiraGovernorClient) {
    for (final Map.Entry<Annotation, Boolean> entry : closePassedDecider.get().get().entrySet()) {
        final Annotation annotation = entry.getKey();
        if (annotation.annotationType() == provides() && entry.getValue()) {
            final String id = ((Jira) annotation).value();
            jiraGovernorClient.close(id);
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-governor,代码行数:10,代码来源:JiraTestExecutionDecider.java


示例10: on

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void on(@Observes AfterSuite event, GitHubGovernorClient githubGovernorClient) {
    for (final Map.Entry<Annotation, Boolean> entry : closePassedDecider.get().get().entrySet()) {
        final Annotation annotation = entry.getKey();
        if (annotation.annotationType() == provides() && entry.getValue()) {
            final String id = ((GitHub) annotation).value();
            githubGovernorClient.close(id);
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-governor,代码行数:10,代码来源:GitHubTestExecutionDecider.java


示例11: afterSuite

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void afterSuite(@Observes AfterSuite event) {
    if (strategy.get().isTakingAction(event)) {
        VideoMetaData metaData = getMetaData();
        VideoType videoType = getVideoType();

        beforeVideoStop.fire(new BeforeVideoStop(videoType, metaData));

        stopRecordSuiteVideo.fire(new StopRecordSuiteVideo(videoType, metaData));

        afterVideoStop.fire(new AfterVideoStop(videoType, metaData));
    }
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:13,代码来源:VideoLifecycleObserver.java


示例12: isTakingAction

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Override
public boolean isTakingAction(Event event) {
    if (event instanceof BeforeSuite
            || event instanceof AfterSuite) {
        return configuration.getStartBeforeSuite();
    } else if (event instanceof BeforeClass
            || event instanceof AfterClass) {
        return configuration.getStartBeforeClass();
    } else if (event instanceof Before) {
        return configuration.getStartBeforeTest()
            || configuration.getTakeOnlyOnFail();
    }

    return false;
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:16,代码来源:DefaultVideoStrategy.java


示例13: defaultConfigurationTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void defaultConfigurationTest() throws Exception {

    // by default, no videos are taken at all

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 0);
    assertEventFired(StartRecordVideo.class, 0);
    assertEventFired(StartRecordSuiteVideo.class, 0);
    assertEventFired(AfterVideoStart.class, 0);

    assertEventFired(BeforeVideoStop.class, 0);
    assertEventFired(StopRecordVideo.class, 0);
    assertEventFired(StopRecordSuiteVideo.class, 0);
    assertEventFired(AfterVideoStop.class, 0);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:28,代码来源:RecorderLifecycleObserverTestCase.java


示例14: takeOnlyOnFailTestFailedTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void takeOnlyOnFailTestFailedTest() throws Exception {

    Mockito.when(configuration.getTakeOnlyOnFail()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.failed(new RuntimeException("some exception")));

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(PropertyReportEvent.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:28,代码来源:RecorderLifecycleObserverTestCase.java


示例15: takeOnlyOnFailTestPassedTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void takeOnlyOnFailTestPassedTest() throws Exception {

    Mockito.when(configuration.getTakeOnlyOnFail()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(PropertyReportEvent.class, 0);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:28,代码来源:RecorderLifecycleObserverTestCase.java


示例16: stopAutoContainers

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void stopAutoContainers(@Observes(precedence = -100) AfterSuite event, CubeDockerConfiguration configuration) {
    beforeAutoStopEvent.fire(new BeforeAutoStop());
    final DockerAutoStartOrder dockerAutoStartOrder = configuration.getDockerAutoStartOrder();
    List<String[]> autoStopSteps = dockerAutoStartOrder.getAutoStopOrder(configuration);
    stopAllSteps(autoStopSteps);
    afterAutoStopEvent.fire(new AfterAutoStop());
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:8,代码来源:CubeSuiteLifecycleController.java


示例17: destroyNetworks

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void destroyNetworks(@Observes(precedence = -200) AfterSuite event, CubeDockerConfiguration configuration) {
    final NetworkRegistry networkRegistry = networkRegistryInstance.get();
    final DockerClientExecutor dockerClientExecutor = dockerClientExecutorInstance.get();

    final Set<String> networkIds = networkRegistry.getNetworkIds();

    for (String networkId : networkIds) {
        dockerClientExecutor.removeNetwork(networkId);
    }
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:11,代码来源:NetworkLifecycleController.java


示例18: shouldStopNetworks

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void shouldStopNetworks() {

    DockerClientExecutor executor = Mockito.mock(DockerClientExecutor.class);

    String config =
        "networks:\n" +
            "  mynetwork:\n " +
            "    driver: bridge\n" +
            "tomcat6:\n" +
            "  image: tutum/tomcat:6.0\n" +
            "  exposedPorts: [8089/tcp]\n" +
            "  await:\n" +
            "    strategy: static\n" +
            "    ip: localhost\n" +
            "    ports: [8080, 8089]\n" +
            "tomcat7:\n" +
            "  extends: tomcat6\n" +
            "  image: tutum/tomcat:7.0\n";

    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put("dockerContainers", config);
    parameters.put("definitionFormat", DefinitionFormat.CUBE.name());

    CubeConfiguration cubeConfiguration = CubeConfiguration.fromMap(new HashMap<String, String>());
    bind(ApplicationScoped.class, CubeConfiguration.class, cubeConfiguration);

    CubeDockerConfiguration dockerConfiguration = CubeDockerConfiguration.fromMap(parameters, null);
    bind(ApplicationScoped.class, CubeDockerConfiguration.class, dockerConfiguration);

    final LocalDockerNetworkRegistry localDockerNetworkRegistry = new LocalDockerNetworkRegistry();
    localDockerNetworkRegistry.addNetwork("mynetwork", new Network());
    bind(ApplicationScoped.class, NetworkRegistry.class, localDockerNetworkRegistry);
    bind(ApplicationScoped.class, DockerClientExecutor.class, executor);

    fire(new AfterSuite());
    Mockito.verify(executor).removeNetwork(Matchers.eq("mynetwork"));
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:39,代码来源:NetworkLifecycleControllerTest.java


示例19: startConversion

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void startConversion(@Observes AfterSuite afterSuite, CubeDroneConfiguration cubeDroneConfiguration,
    CubeRegistry cubeRegistry) {

    if (cubeDroneConfiguration.isRecording()) {
        initConversionCube(cubeRegistry);
        flv2mp4.create();
        flv2mp4.start();

        afterConversionEvent.fire(new AfterConversion());
    }
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:12,代码来源:VideoConversionLifecycleManager.java


示例20: stopAutoContainers

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void stopAutoContainers(@Observes(precedence = -99) AfterSuite event,
    Configuration conf) {
    if (!(conf instanceof CubeOpenShiftConfiguration)) {
        return;
    }
    CubeOpenShiftConfiguration openshiftConfiguration = (CubeOpenShiftConfiguration) conf;

    String[] autostart = openshiftConfiguration.getAutoStartContainers();
    for (int i = autostart.length - 1; i > -1; i--) {
        String cubeId = autostart[i];
        controlEvent.fire(new StopCube(cubeId));
        controlEvent.fire(new DestroyCube(cubeId));
    }
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:15,代码来源:OpenShiftSuiteLifecycleController.java



注:本文中的org.jboss.arquillian.test.spi.event.suite.AfterSuite类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Grammar类代码示例发布时间:2022-05-22
下一篇:
Java NodeHeartbeatRequestPBImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap