test(net): pass simulated nowMs to PumpNetwork in LobbySquadSwap test

This commit is contained in:
Meta Vens 2026-12-06 01:07:57 +01:00
commit d6dc89db67

View file

@ -729,7 +729,7 @@ namespace RustToDust.Tests
{ {
nowMs += 16; nowMs += 16;
host.StepOnce(nowMs); host.StepOnce(nowMs);
clientA.PumpNetwork(); clientA.PumpNetwork(nowMs);
Thread.Sleep(2); Thread.Sleep(2);
} }
Assert.True(clientA.IsJoined); Assert.True(clientA.IsJoined);
@ -746,7 +746,7 @@ namespace RustToDust.Tests
{ {
nowMs += 16; nowMs += 16;
host.StepOnce(nowMs); host.StepOnce(nowMs);
clientA.PumpNetwork(); clientA.PumpNetwork(nowMs);
Thread.Sleep(2); Thread.Sleep(2);
} }
Assert.Equal((byte)2, host.Session.State.Contenders[0].SquadId); Assert.Equal((byte)2, host.Session.State.Contenders[0].SquadId);
@ -758,7 +758,7 @@ namespace RustToDust.Tests
{ {
nowMs += 16; nowMs += 16;
host.StepOnce(nowMs); host.StepOnce(nowMs);
clientA.PumpNetwork(); clientA.PumpNetwork(nowMs);
if (host.Session.State.Phase == MatchPhase.Active && clientA.ViewState.Phase == MatchPhase.Active) if (host.Session.State.Phase == MatchPhase.Active && clientA.ViewState.Phase == MatchPhase.Active)
{ {
break; break;
@ -801,7 +801,7 @@ namespace RustToDust.Tests
{ {
nowMs += 16; nowMs += 16;
host.StepOnce(nowMs); host.StepOnce(nowMs);
clientARejoin.PumpNetwork(); clientARejoin.PumpNetwork(nowMs);
Thread.Sleep(2); Thread.Sleep(2);
} }
Assert.True(clientARejoin.IsJoined); Assert.True(clientARejoin.IsJoined);
@ -814,8 +814,8 @@ namespace RustToDust.Tests
{ {
nowMs += 16; nowMs += 16;
host.StepOnce(nowMs); host.StepOnce(nowMs);
clientARejoin.PumpNetwork(); clientARejoin.PumpNetwork(nowMs);
clientB.PumpNetwork(); clientB.PumpNetwork(nowMs);
Thread.Sleep(2); Thread.Sleep(2);
} }
Assert.True(clientB.IsJoined); Assert.True(clientB.IsJoined);