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;
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;
} else {
s = dispatch.createServer(((InetSocketAddress) getTcpServerAddress()));
}
- s.await();
+ s.await(RESOURCE_TIMEOUT_MINUTES, TimeUnit.MINUTES);
return s.channel();
}
"/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<InputStream> yangDependencies = new ArrayList<>();
*/
@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) {