Migrate to expectNoMessage() 71/75371/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Aug 2018 09:43:53 +0000 (11:43 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Aug 2018 09:50:29 +0000 (11:50 +0200)
expectNoMsg() has been deprecated, move to its replacement.

Change-Id: I51fc5dc28fd8131b76ca00d254de06403e06de69
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ActorBehaviorTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ReconnectingClientConnectionTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/TransmittingTransmitQueueTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerActorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/CandidateListChangeListenerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerGetSnapshotReplyActorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/ActorContextTest.java

index 793b0b4..d299381 100644 (file)
@@ -140,7 +140,7 @@ public class ActorBehaviorTest {
         probe.expectMsgClass(MockedSnapshotStore.DeleteByCriteriaRequest.class);
         probe.reply(new RuntimeException("delete failed"));
         //actor shouldn't terminate
-        probe.expectNoMsg();
+        probe.expectNoMessage();
     }
 
     @SuppressWarnings("unchecked")
index 8ce7530..564de90 100644 (file)
@@ -62,7 +62,7 @@ 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);
index 8db4803..f1bceee 100644 (file)
@@ -123,7 +123,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
         for (int i = 0; i < getMaxInFlightMessages(); i++) {
             probe.expectMsgClass(RequestEnvelope.class);
         }
-        probe.expectNoMsg();
+        probe.expectNoMessage();
         final Collection<ConnectionEntry> entries = queue.drain();
         assertEquals(sentMessages, entries.size());
         assertThat(entries, everyItem(entryWithRequest(request)));
@@ -288,7 +288,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
         final Request<?, ?> request2 = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 1L, probe.ref());
         queue.enqueueOrForward(new ConnectionEntry(request2, mockConsumer, now), now);
         verifyNoMoreInteractions(mockMessageSlicer);
-        probe.expectNoMsg();
+        probe.expectNoMessage();
 
         RequestEnvelope requestEnvelope = (RequestEnvelope) sliceOptions.getValue().getMessage();
         queue.complete(new FailureEnvelope(request.toRequestFailure(mock(RequestException.class)),
index 726b290..627e434 100644 (file)
@@ -62,7 +62,7 @@ public class DataTreeChangeListenerActorTest extends AbstractActorTest {
                 subject.tell(new DataTreeChanged(mockCandidates), getRef());
 
                 within(duration("1 seconds"), () -> {
-                    expectNoMsg();
+                    expectNoMessage();
                     Mockito.verify(mockListener, Mockito.never())
                         .onDataTreeChanged(Matchers.anyCollectionOf(DataTreeCandidate.class));
                     return null;
index 399b3e2..aac23e7 100644 (file)
@@ -94,7 +94,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest {
 
                 proxy.close();
 
-                expectNoMsg();
+                expectNoMessage();
             }
         };
     }
@@ -150,7 +150,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest {
 
                 reply(new LocalShardNotFound("shard-1"));
 
-                expectNoMsg(duration("1 seconds"));
+                expectNoMessage(duration("1 seconds"));
 
                 proxy.close();
             }
@@ -177,7 +177,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest {
                 reply(new NotInitializedException("not initialized"));
 
                 within(duration("1 seconds"), () ->  {
-                    expectNoMsg();
+                    expectNoMessage();
                     return null;
                 });
 
index 3f9b813..cd6e066 100644 (file)
@@ -122,7 +122,7 @@ public class RemoteTransactionContextTest extends AbstractActorTest {
             }
         });
 
-        kit.expectNoMsg();
+        kit.expectNoMessage();
     }
 
     /**
@@ -158,7 +158,7 @@ public class RemoteTransactionContextTest extends AbstractActorTest {
             }
         });
 
-        kit.expectNoMsg();
+        kit.expectNoMessage();
     }
 
     private void sendReply(final Object message) {
index bc2f611..e3ae265 100644 (file)
@@ -72,7 +72,7 @@ public class CandidateListChangeListenerTest extends AbstractActorTest {
                 ImmutableSet.copyOf(candidateAdded.getAllCandidates()));
 
         writeNode(ENTITY_OWNERS_PATH, entityOwnersWithCandidate(ENTITY_TYPE, ENTITY_ID1, memberName1));
-        kit.expectNoMsg(FiniteDuration.create(500, TimeUnit.MILLISECONDS));
+        kit.expectNoMessage(FiniteDuration.create(500, TimeUnit.MILLISECONDS));
 
         String memberName2 = "member-2";
         writeNode(ENTITY_OWNERS_PATH, entityOwnersWithCandidate(ENTITY_TYPE, ENTITY_ID1, memberName2));
index 0f70170..752c8e1 100644 (file)
@@ -62,7 +62,7 @@ public class ShardManagerGetSnapshotReplyActorTest extends AbstractActorTest {
                 Snapshot.create(shard2SnapshotState, Collections.<ReplicatedLogEntry>emptyList(),
                         2, 1, 2, 1, 1, "member-1", null)), ActorRef.noSender());
 
-        kit.expectNoMsg(FiniteDuration.create(500, TimeUnit.MILLISECONDS));
+        kit.expectNoMessage(FiniteDuration.create(500, TimeUnit.MILLISECONDS));
 
         ByteState shard3SnapshotState = ByteState.of(new byte[]{7,8,9});
         replyActor.tell(new GetSnapshotReply(ShardIdentifier.create("shard3", MEMBER_1, "config").toString(),
index 048c0c8..bfb4129 100644 (file)
@@ -526,18 +526,18 @@ public class ShardManagerTest extends AbstractShardManagerTest {
                 // RoleChangeNotification.
                 shardManager.tell(new FindPrimary(Shard.DEFAULT_NAME, true), getRef());
 
-                expectNoMsg(FiniteDuration.create(150, TimeUnit.MILLISECONDS));
+                expectNoMessage(FiniteDuration.create(150, TimeUnit.MILLISECONDS));
 
                 shardManager.tell(new ActorInitialized(), mockShardActor);
 
-                expectNoMsg(FiniteDuration.create(150, TimeUnit.MILLISECONDS));
+                expectNoMessage(FiniteDuration.create(150, TimeUnit.MILLISECONDS));
 
                 String memberId = "member-1-shard-default-" + shardMrgIDSuffix;
                 shardManager.tell(
                         new RoleChangeNotification(memberId, RaftState.Candidate.name(), RaftState.Leader.name()),
                         mockShardActor);
 
-                expectNoMsg(FiniteDuration.create(150, TimeUnit.MILLISECONDS));
+                expectNoMessage(FiniteDuration.create(150, TimeUnit.MILLISECONDS));
 
                 DataTree mockDataTree = mock(DataTree.class);
                 shardManager.tell(new ShardLeaderStateChanged(memberId, memberId, mockDataTree,
@@ -549,7 +549,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
                         primaryFound.getPrimaryPath().contains("member-1-shard-default"));
                 assertSame("getLocalShardDataTree", mockDataTree, primaryFound.getLocalShardDataTree());
 
-                expectNoMsg(FiniteDuration.create(200, TimeUnit.MILLISECONDS));
+                expectNoMessage(FiniteDuration.create(200, TimeUnit.MILLISECONDS));
             }
         };
 
@@ -571,7 +571,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
 
                 shardManager.tell(new ActorInitialized(), mockShardActor);
 
-                expectNoMsg(FiniteDuration.create(200, TimeUnit.MILLISECONDS));
+                expectNoMessage(FiniteDuration.create(200, TimeUnit.MILLISECONDS));
             }
         };
 
index 22cc77f..a1ff319 100644 (file)
@@ -156,7 +156,7 @@ public class ActorContextTest extends AbstractActorTest {
 
                     assertEquals(shardActorRef, out.get());
 
-                    expectNoMsg();
+                    expectNoMessage();
                     return null;
                 });
             }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.