@BeforeClass
public static void setup() throws InterruptedException {
- Thread.sleep(1000);//give some time for previous test to stop the system. Netty port conflict arises otherwise.
system = ActorSystem.create("opendaylight-rpc", ConfigFactory.load().getConfig("unit-test"));
system.actorOf(Props.create(TerminationMonitor.class), "termination-monitor");
verify(mockGossiper, times(0)).updateRemoteBuckets(anyMap());
}
- @Test
- public void testUpdateRemoteBuckets_WhenNoBucketShouldIgnore(){
-
- mockGossiper.updateRemoteBuckets(null);
- verify(mockGossiper, times(0)).getContext();
-
- Map<Address, Bucket> empty = Collections.emptyMap();
- mockGossiper.updateRemoteBuckets(empty);
- verify(mockGossiper, times(0)).getContext();
- }
-
/**
* Create Gossiper actor and return the underlying instance of Gossiper class.
*