diff --git a/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs b/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs index 80bbabe..5e94cf0 100644 --- a/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs +++ b/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs @@ -23,7 +23,8 @@ public class OrleansMatchTests var results = new RecordingResultSink(); var builder = new TestClusterBuilder(); - builder.AddSiloBuilderConfigurator(new SiloConfigurator(time, connections, results)); + SiloConfigurator.Set(time, connections, results); + builder.AddSiloBuilderConfigurator(); var cluster = builder.Build(); try @@ -72,18 +73,17 @@ public class OrleansMatchTests } finally { - await cluster.StopAsync(); - cluster.Dispose(); + await cluster.DisposeAsync(); } } private sealed class SiloConfigurator : ISiloConfigurator { - private readonly FakeTimeProvider _time; - private readonly IMatchConnectionRegistry _connections; - private readonly IMatchResultSink _results; + private static FakeTimeProvider _time = null!; + private static IMatchConnectionRegistry _connections = null!; + private static IMatchResultSink _results = null!; - public SiloConfigurator( + public static void Set( FakeTimeProvider time, IMatchConnectionRegistry connections, IMatchResultSink results)