diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/GatewaySessionTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/GatewaySessionTests.cs index f9e5b97b..587636f2 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/GatewaySessionTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/GatewaySessionTests.cs @@ -267,7 +267,7 @@ public sealed class GatewaySessionTests { // All threads wait at the gate so they start as simultaneously // as the scheduler allows, maximising the race window. - await gate.WaitAsync(testTimeout); + Assert.True(await gate.WaitAsync(testTimeout), "Timed out at the start gate."); lease.Dispose(); }); } @@ -423,7 +423,7 @@ public sealed class GatewaySessionTests int index = t; tasks[index] = Task.Run(async () => { - await gate.WaitAsync(testTimeout); + Assert.True(await gate.WaitAsync(testTimeout), "Timed out at the start gate."); try { IEventSubscriberLease lease = session.AttachEventSubscriber(maxSubscribers: Cap);