Merge "Startup archetype: remove 'Impl' from config subsystem Module name."
[controller.git] / opendaylight / netconf / netconf-ssh / src / test / java / org / opendaylight / controller / netconf / netty / SSHTest.java
index 2802488170ef9cc9ef6d27b3846592b19219ca9b..ab731260216f4452f6ba3d5e8c6b64c8179bdad2 100644 (file)
@@ -84,7 +84,7 @@ public class SSHTest {
 
         final EchoClientHandler echoClientHandler = connectClient(addr);
 
-        Stopwatch stopwatch = new Stopwatch().start();
+        Stopwatch stopwatch = Stopwatch.createStarted();
         while(echoClientHandler.isConnected() == false && stopwatch.elapsed(TimeUnit.SECONDS) < 30) {
             Thread.sleep(500);
         }
@@ -131,12 +131,12 @@ public class SSHTest {
     public void testClientWithoutServer() throws Exception {
         final InetSocketAddress address = new InetSocketAddress(12345);
         final EchoClientHandler echoClientHandler = connectClient(address);
-        final Stopwatch stopwatch = new Stopwatch().start();
+        final Stopwatch stopwatch = Stopwatch.createStarted();
         while(echoClientHandler.getState() == State.CONNECTING && stopwatch.elapsed(TimeUnit.SECONDS) < 5) {
             Thread.sleep(100);
         }
         assertFalse(echoClientHandler.isConnected());
-        assertEquals(State.CONNECTION_CLOSED, echoClientHandler.getState());
+        assertEquals(State.FAILED_TO_CONNECT, echoClientHandler.getState());
     }
 
 }