From 5164107788e0ce22d59a203a8865edb3ad8e1890 Mon Sep 17 00:00:00 2001
From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Date: Sun, 1 Oct 2023 07:00:20 +1100
Subject: [PATCH] Add TestPair.WaitCommand() (#20615)
---
.../Pair/TestPair.Helpers.cs | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Content.IntegrationTests/Pair/TestPair.Helpers.cs b/Content.IntegrationTests/Pair/TestPair.Helpers.cs
index 1478a4c7d2..510dc0b854 100644
--- a/Content.IntegrationTests/Pair/TestPair.Helpers.cs
+++ b/Content.IntegrationTests/Pair/TestPair.Helpers.cs
@@ -76,4 +76,22 @@ public sealed partial class TestPair
return otherUid.Value;
}
+
+ ///
+ /// Execute a command on the server and wait some number of ticks.
+ ///
+ public async Task WaitCommand(string cmd, int numTicks = 10)
+ {
+ await Server.ExecuteCommand(cmd);
+ await RunTicksSync(numTicks);
+ }
+
+ ///
+ /// Execute a command on the client and wait some number of ticks.
+ ///
+ public async Task WaitClientCommand(string cmd, int numTicks = 10)
+ {
+ await Client.ExecuteCommand(cmd);
+ await RunTicksSync(numTicks);
+ }
}
--
2.51.2