]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Suppress `SharedMapSystem` info logs in tests (#40592)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Fri, 3 Oct 2025 11:23:04 +0000 (00:23 +1300)
committerGitHub <noreply@github.com>
Fri, 3 Oct 2025 11:23:04 +0000 (11:23 +0000)
* Supress informational `SharedMapSystem` logs in tests

* Why is the client like this

Content.IntegrationTests/Pair/TestPair.cs

index 947840d5cedad768c07272f23d94f7b1cbb0563c..81f99146f7484f77a2497a97269adce7ab6361ed 100644 (file)
@@ -27,6 +27,16 @@ public sealed partial class TestPair : RobustIntegrationTest.TestPair
 
     protected override async Task Initialize()
     {
+        await base.Initialize();
+
+        // Prevent info log spam in some tests (particularly SpawnAndDeleteAllEntitiesOnDifferentMaps)
+        Server.System<SharedMapSystem>().Log.Level = LogLevel.Warning;
+        Client.EntMan.EntitySysManager.SystemLoaded += (_, e) =>
+        {
+            if (e.System is SharedMapSystem map)
+                map.Log.Level = LogLevel.Warning;
+        };
+
         var settings = (PoolSettings)Settings;
         if (!settings.DummyTicker)
         {