Fix Orleans test cluster API usage
This commit is contained in:
parent
b3e4c868bc
commit
edd3dfe0de
|
|
@ -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<SiloConfigurator>();
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue