Brian O'Connor
Committed by Gerrit Code Review

Patch job on transient test failure

Change-Id: Ia32daed4d25e9315e904978d0ca2bb14955ab1a6
...@@ -19,6 +19,7 @@ import static org.junit.Assert.assertEquals; ...@@ -19,6 +19,7 @@ import static org.junit.Assert.assertEquals;
19 import static org.junit.Assert.assertNull; 19 import static org.junit.Assert.assertNull;
20 import static org.junit.Assert.assertTrue; 20 import static org.junit.Assert.assertTrue;
21 import static org.onosproject.net.MastershipRole.*; 21 import static org.onosproject.net.MastershipRole.*;
22 +import static org.onosproject.net.intent.TestTools.delay;
22 23
23 import java.util.Map; 24 import java.util.Map;
24 import java.util.Set; 25 import java.util.Set;
...@@ -121,6 +122,7 @@ public class DistributedMastershipStoreTest { ...@@ -121,6 +122,7 @@ public class DistributedMastershipStoreTest {
121 assertTrue("wrong store state:", dms.roleMap.isEmpty()); 122 assertTrue("wrong store state:", dms.roleMap.isEmpty());
122 123
123 testStore.put(DID1, N1, true, false, false); 124 testStore.put(DID1, N1, true, false, false);
125 + delay(10); //TODO there seems to be a race here.
124 assertEquals("wrong master:", N1, dms.getMaster(DID1)); 126 assertEquals("wrong master:", N1, dms.getMaster(DID1));
125 assertNull("wrong master:", dms.getMaster(DID2)); 127 assertNull("wrong master:", dms.getMaster(DID2));
126 } 128 }
......