X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-it%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fit%2FAbstractNetconfConfigTest.java;h=fd362f83e7d793f0accff7a25aa3d9d5207f6d0e;hb=4e34227ab875f0c1ecb25fc315ec96c9a44333d3;hp=bd931c33d0212858b615aed61d843e1e6f1744d9;hpb=e71922c94cec22e9f37648a2d04bf2eb3274cf2f;p=controller.git diff --git a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/AbstractNetconfConfigTest.java b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/AbstractNetconfConfigTest.java index bd931c33d0..fd362f83e7 100644 --- a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/AbstractNetconfConfigTest.java +++ b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/AbstractNetconfConfigTest.java @@ -34,6 +34,7 @@ import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; +import java.util.concurrent.TimeUnit; import org.apache.commons.io.IOUtils; import org.junit.After; import org.junit.Before; @@ -77,10 +78,13 @@ public abstract class AbstractNetconfConfigTest extends AbstractConfigTest { public static final String LOOPBACK_ADDRESS = "127.0.0.1"; public static final int SERVER_CONNECTION_TIMEOUT_MILLIS = 5000; + private static final int RESOURCE_TIMEOUT_MINUTES = 2; - static ModuleFactory[] FACTORIES = { new TestImplModuleFactory(), - new DepTestImplModuleFactory(), new NetconfTestImplModuleFactory(), - new IdentityTestModuleFactory(), new MultipleDependenciesModuleFactory() }; + static ModuleFactory[] FACTORIES = {new TestImplModuleFactory(), + new DepTestImplModuleFactory(), + new NetconfTestImplModuleFactory(), + new IdentityTestModuleFactory(), + new MultipleDependenciesModuleFactory() }; private EventLoopGroup nettyThreadgroup; private HashedWheelTimer hashedWheelTimer; @@ -143,7 +147,7 @@ public abstract class AbstractNetconfConfigTest extends AbstractConfigTest { } else { s = dispatch.createServer(((InetSocketAddress) getTcpServerAddress())); } - s.await(); + s.await(RESOURCE_TIMEOUT_MINUTES, TimeUnit.MINUTES); return s.channel(); } @@ -185,6 +189,7 @@ public abstract class AbstractNetconfConfigTest extends AbstractConfigTest { "/META-INF/yang/config-test.yang", "/META-INF/yang/config-test-impl.yang", "/META-INF/yang/test-types.yang", + "/META-INF/yang/test-groups.yang", "/META-INF/yang/ietf-inet-types.yang"); final Collection yangDependencies = new ArrayList<>(); @@ -227,9 +232,9 @@ public abstract class AbstractNetconfConfigTest extends AbstractConfigTest { */ @After public void cleanUpNetconf() throws Exception { - serverTcpChannel.close().await(); + serverTcpChannel.close().await(RESOURCE_TIMEOUT_MINUTES, TimeUnit.MINUTES); hashedWheelTimer.stop(); - nettyThreadgroup.shutdownGracefully().await(); + nettyThreadgroup.shutdownGracefully().await(RESOURCE_TIMEOUT_MINUTES, TimeUnit.MINUTES); } public NetconfClientConfiguration getClientConfiguration(final InetSocketAddress tcpAddress, final int timeout) {