Brian O'Connor
Committed by Ray Milkey

Adding assertAfter to intermittent DistributedMastershipStoreTest

Change-Id: I0c6c9f20d21d3c5a3bfca518fada3b3b3b0b38a0
......@@ -26,6 +26,7 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.onlab.junit.TestTools;
import org.onlab.packet.IpAddress;
import org.onosproject.cluster.ClusterServiceAdapter;
import org.onosproject.cluster.ControllerNode;
......@@ -119,7 +120,8 @@ public class DistributedMastershipStoreTest {
assertTrue("wrong store state:", dms.roleMap.isEmpty());
testStore.put(DID1, N1, true, false, false);
assertEquals("wrong master:", N1, dms.getMaster(DID1));
TestTools.assertAfter(100, () -> //wait for up to 100ms
assertEquals("wrong master:", N1, dms.getMaster(DID1)));
assertNull("wrong master:", dms.getMaster(DID2));
}
......