]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix guideentryprototypetests (#24427)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Tue, 23 Jan 2024 00:30:09 +0000 (11:30 +1100)
committerGitHub <noreply@github.com>
Tue, 23 Jan 2024 00:30:09 +0000 (11:30 +1100)
It hits the style update limit so try running a tick and see if we can avoid having too many queued.

Content.IntegrationTests/Tests/Guidebook/GuideEntryPrototypeTests.cs

index 7d686dffe64fe511c1a7ffc05d0370b1e10e76fa..b56191525f871ff3975123feb18154ce60a8aac8 100644 (file)
@@ -23,17 +23,18 @@ public sealed class GuideEntryPrototypeTests
         var parser = client.ResolveDependency<DocumentParsingManager>();
         var prototypes = protoMan.EnumeratePrototypes<GuideEntryPrototype>().ToList();
 
-        await client.WaitAssertion(() =>
+        foreach (var proto in prototypes)
         {
-            Assert.Multiple(() =>
+            await client.WaitAssertion(() =>
             {
-                foreach (var proto in prototypes)
-                {
-                    var text = resMan.ContentFileReadText(proto.Text).ReadToEnd();
-                    Assert.That(parser.TryAddMarkup(new Document(), text), $"Failed to parse guidebook: {proto.Id}");
-                }
+                using var reader = resMan.ContentFileReadText(proto.Text);
+                var text = reader.ReadToEnd();
+                Assert.That(parser.TryAddMarkup(new Document(), text), $"Failed to parse guidebook: {proto.Id}");
             });
-        });
+
+            // Avoid styleguide update limit
+            await client.WaitRunTicks(1);
+        }
 
         await pair.CleanReturnAsync();
     }