Skip to content

Commit

Permalink
Wait, silly.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepyyapril committed Dec 22, 2024
1 parent 0fac658 commit d24876d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Content.IntegrationTests/Pair/TestPair.Recycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
using System.IO;
using System.Linq;
using Content.Server.GameTicking;
using Content.Server.Preferences.Managers;
using Content.Shared.CCVar;
using Content.Shared.GameTicking;
using Content.Shared.Mind;
using Content.Shared.Mind.Components;
using Content.Shared.Preferences;
using Robust.Client;
using Robust.Server.Player;
using Robust.Shared.Exceptions;
Expand Down Expand Up @@ -34,6 +36,10 @@ private async Task OnDirtyDispose()

private async Task OnCleanDispose()
{
await Server.WaitIdleAsync();
await Client.WaitIdleAsync();
await Server.RemoveAllDummySessions();

if (TestMap != null)
{
await Server.WaitPost(() => Server.EntMan.DeleteEntity(TestMap.MapUid));
Expand Down Expand Up @@ -132,6 +138,7 @@ public async Task CleanPooledPair(PoolSettings settings, TextWriter testOut)
if (gameTicker.RunLevel != GameRunLevel.PreRoundLobby)
{
await testOut.WriteLineAsync($"Recycling: {Watch.Elapsed.TotalMilliseconds} ms: Restarting round.");
Server.CfgMan.SetCVar(CCVars.GameDummyTicker, false);
Assert.That(gameTicker.DummyTicker, Is.False);
Server.CfgMan.SetCVar(CCVars.GameLobbyEnabled, true);
await Server.WaitPost(() => gameTicker.RestartRound());
Expand Down

0 comments on commit d24876d

Please sign in to comment.