Merge "Unify maven-bundle-plugin version at 2.4.0"
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / implementation / src / test / java / org / opendaylight / controller / sal / connector / remoterpc / ClientRequestHandlerTest.java
index e1345945a73dabf0951883bf62cbcde1d0518f87..1edd004d3725a5fcbe55a8e7057087cdd83a5b53 100644 (file)
@@ -1,6 +1,20 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.sal.connector.remoterpc;
 
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.TimeUnit;
+
 import junit.framework.Assert;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -10,9 +24,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.zeromq.ZMQ;
 
-import java.io.IOException;
-import java.util.concurrent.*;
-
 /**
  *
  */
@@ -22,7 +33,7 @@ public class ClientRequestHandlerTest {
 
   ZMQ.Context context;
   ExecutorService serverThread;
-  final String SERVER_ADDRESS = "localhost:5554";
+  final String SERVER_ADDRESS = "localhost:5553";
 
   ClientRequestHandler handler;
 
@@ -62,7 +73,7 @@ public class ClientRequestHandlerTest {
       serverThread.execute(MessagingUtil.startReplyServer(context, serverAddress, 1));
       threadPool.execute(createEmptyMessageTaskAndHandle(handler, serverAddress));
     }
-    Thread.currentThread().sleep(5000);//wait for all messages to get processed
+    Thread.sleep(5000);//wait for all messages to get processed
     //should be connected to 5 remote server
     Assert.assertEquals(5, handler.getWorkerCount());
   }