]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Test parallelization stuff. (#31650)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Sun, 1 Sep 2024 01:28:30 +0000 (03:28 +0200)
committerGitHub <noreply@github.com>
Sun, 1 Sep 2024 01:28:30 +0000 (03:28 +0200)
This is the content analogue of https://github.com/space-wizards/RobustToolbox/pull/5412

Made Content.Tests run tests parallelized, which doesn't really seem to matter much.

I tried to make Content.IntegrationTest more aggressively parallelized but ran into https://github.com/dotnet/runtime/issues/107197 so we need to shelve that. Added a comment explaining as such.

Content.IntegrationTests/AssemblyInfo.cs [new file with mode: 0644]
Content.IntegrationTests/PoolManager.cs
Content.IntegrationTests/PoolManagerTestEventHandler.cs
Content.Tests/AssemblyInfo.cs [new file with mode: 0644]

diff --git a/Content.IntegrationTests/AssemblyInfo.cs b/Content.IntegrationTests/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..76fc42f
--- /dev/null
@@ -0,0 +1,8 @@
+[assembly: Parallelizable(ParallelScope.Children)]
+
+// I don't know why this parallelism limit was originally put here.
+// I *do* know that I tried removing it, and ran into the following .NET runtime problem:
+// https://github.com/dotnet/runtime/issues/107197
+// So we can't really parallelize integration tests harder either until the runtime fixes that,
+// *or* we fix serv3 to not spam expression trees.
+[assembly: LevelOfParallelism(3)]
index 34ac4060ddc88699dfb73a623404859d1aaa23ee..c7b8dcaee96817485a5df67cc66940bf03306cde 100644 (file)
@@ -23,8 +23,6 @@ using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
 using Robust.UnitTesting;
 
-[assembly: LevelOfParallelism(3)]
-
 namespace Content.IntegrationTests;
 
 /// <summary>
index 3b26d6637fdf807035531120b341229197068aa1..be4c746a60a216443558f3e7e33f587158a1c9b1 100644 (file)
@@ -1,7 +1,4 @@
-
-[assembly: Parallelizable(ParallelScope.Children)]
-
-namespace Content.IntegrationTests;
+namespace Content.IntegrationTests;
 
 [SetUpFixture]
 public sealed class PoolManagerTestEventHandler
diff --git a/Content.Tests/AssemblyInfo.cs b/Content.Tests/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..8e01f41
--- /dev/null
@@ -0,0 +1,3 @@
+using NUnit.Framework;
+
+[assembly: Parallelizable(ParallelScope.Fixtures)]