CONTROLLER-1811: Fix IT hang in startup archetype
[controller.git] / opendaylight / archetypes / opendaylight-startup / src / main / resources / archetype-resources / it / src / test / java / __packageInPathFormat__ / it / __classPrefix__Test.java
1 #set( $symbol_pound = '#' )
2 #set( $symbol_dollar = '$' )
3 #set( $symbol_escape = '\' )
4 /*
5  * Copyright © ${copyrightYear} ${copyright} and others.  All rights reserved.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
9  * and is available at http://www.eclipse.org/legal/epl-v10.html
10  */
11 package ${package}.it;
12
13 import static org.ops4j.pax.exam.CoreOptions.composite;
14 import static org.ops4j.pax.exam.CoreOptions.maven;
15 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
16
17 import org.junit.Assert;
18 import org.junit.Ignore;
19 import org.junit.Test;
20 import org.junit.runner.RunWith;
21 import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
22 import org.ops4j.pax.exam.Option;
23 import org.ops4j.pax.exam.junit.PaxExam;
24 import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
25 import org.ops4j.pax.exam.options.MavenUrlReference;
26 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
27 import org.ops4j.pax.exam.spi.reactors.PerClass;
28 import org.slf4j.Logger;
29 import org.slf4j.LoggerFactory;
30
31 @RunWith(PaxExam.class)
32 @ExamReactorStrategy(PerClass.class)
33 public class ${classPrefix}Test extends AbstractMdsalTestBase {
34     private static final Logger LOG = LoggerFactory.getLogger(${classPrefix}Test.class);
35
36     @Override
37     public MavenUrlReference getFeatureRepo() {
38         return maven()
39                 .groupId("${groupId}")
40                 .artifactId("features-${artifactId}")
41                 .classifier("features")
42                 .type("xml")
43                 .versionAsInProject();
44     }
45
46     @Override
47     public String getFeatureName() {
48         return "odl-${artifactId}";
49     }
50
51     @Override
52     public Option getLoggingOption() {
53         Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
54                 logConfiguration(${classPrefix}Test.class),
55                 LogLevel.INFO.name());
56         option = composite(option, super.getLoggingOption());
57         return option;
58     }
59
60     @Test
61     public void test${artifactId}FeatureLoad() {
62         Assert.assertTrue(true);
63     }
64 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.