You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixing the race condition test instability when running OwnershipPermissionsTests against CMB service until the order in which a message is received will reflect the order in which it is sent relative to messages received prior to and after the given message.
// Send out a request from three clients at the same time
283
-
// The first one sent (and received for this test) gets ownership
291
+
// The first one received gets ownership
284
292
requestStatus=secondInstance.RequestOwnership();
285
293
Assert.True(requestStatus==NetworkObject.OwnershipRequestStatus.RequestSent,$"Client-{secondClient.LocalClientId} was unable to send a request for ownership because: {requestStatus}!");
286
294
requestStatus=thirdInstance.RequestOwnership();
@@ -291,7 +299,7 @@ public IEnumerator ValidateOwnershipPermissionsTest()
291
299
// The 2nd and 3rd client should be denied and the 4th client should be approved
AssertOnTimeout("[Targeted Owner] A client received an incorrect response. "+
294
-
$"Expected one client to have {NetworkObject.OwnershipRequestResponseStatus.Approved} and the others to have {NetworkObject.OwnershipRequestResponseStatus.RequestInProgress}!."
302
+
$"Expected one client to have {NetworkObject.OwnershipRequestResponseStatus.Approved} and the others to have {NetworkObject.OwnershipRequestResponseStatus.RequestInProgress} or {NetworkObject.OwnershipRequestResponseStatus.Denied}!."
295
303
+$"\n Client-{fourthClient.LocalClientId}: has {fourthInstanceHelper.OwnershipRequestResponseStatus}!"
296
304
+$"\n Client-{thirdClient.LocalClientId}: has {thirdInstanceHelper.OwnershipRequestResponseStatus}!"
297
305
+$"\n Client-{secondClient.LocalClientId}: has {secondInstanceHelper.OwnershipRequestResponseStatus}!");
@@ -305,6 +313,9 @@ public IEnumerator ValidateOwnershipPermissionsTest()
0 commit comments