Improve error reporting for tell-based reads
[controller.git] / opendaylight / md-sal / cds-access-client / src / test / java / org / opendaylight / controller / cluster / access / client / ReconnectingClientConnectionTest.java
index 8ce7530bb0207255d91cad4a692ec1e2124d19bf..0b7d0c26559d999be4a9fdaaec2d4b2d733dcb4f 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.cluster.access.client;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.after;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -42,8 +42,9 @@ public class ReconnectingClientConnectionTest
 
     @Override
     protected ReconnectingClientConnection<BackendInfo> createConnection() {
-        final BackendInfo backend = new BackendInfo(backendProbe.ref(), 0L, ABIVersion.BORON, 10);
-        final ConnectingClientConnection<BackendInfo> connectingConn = new ConnectingClientConnection<>(context, 0L);
+        final BackendInfo backend = new BackendInfo(backendProbe.ref(), "test", 0L, ABIVersion.BORON, 10);
+        final ConnectingClientConnection<BackendInfo> connectingConn = new ConnectingClientConnection<>(context, 0L,
+                backend.getName());
         final ConnectedClientConnection<BackendInfo> connectedConn =
                 new ConnectedClientConnection<>(connectingConn, backend);
         return new ReconnectingClientConnection<>(connectedConn, mock(RequestException.class));
@@ -62,11 +63,11 @@ public class ReconnectingClientConnectionTest
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         final Request<?, ?> request = createRequest(replyToProbe.ref());
         connection.sendRequest(request, callback);
-        backendProbe.expectNoMsg();
+        backendProbe.expectNoMessage();
         final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(CLIENT_ID, 0L);
         final RequestSuccess<?, ?> message = new TransactionAbortSuccess(new TransactionIdentifier(historyId, 0L), 0L);
         final ResponseEnvelope<?> envelope = new SuccessEnvelope(message, 0L, 0L, 0L);
         connection.receiveResponse(envelope);
         verify(callback, after(1000).never()).accept(any());
     }
-}
\ No newline at end of file
+}