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 results = new RecordingResultSink();
|
||||||
|
|
||||||
var builder = new TestClusterBuilder();
|
var builder = new TestClusterBuilder();
|
||||||
builder.AddSiloBuilderConfigurator(new SiloConfigurator(time, connections, results));
|
SiloConfigurator.Set(time, connections, results);
|
||||||
|
builder.AddSiloBuilderConfigurator<SiloConfigurator>();
|
||||||
var cluster = builder.Build();
|
var cluster = builder.Build();
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
@ -72,18 +73,17 @@ public class OrleansMatchTests
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
await cluster.StopAsync();
|
await cluster.DisposeAsync();
|
||||||
cluster.Dispose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private sealed class SiloConfigurator : ISiloConfigurator
|
private sealed class SiloConfigurator : ISiloConfigurator
|
||||||
{
|
{
|
||||||
private readonly FakeTimeProvider _time;
|
private static FakeTimeProvider _time = null!;
|
||||||
private readonly IMatchConnectionRegistry _connections;
|
private static IMatchConnectionRegistry _connections = null!;
|
||||||
private readonly IMatchResultSink _results;
|
private static IMatchResultSink _results = null!;
|
||||||
|
|
||||||
public SiloConfigurator(
|
public static void Set(
|
||||||
FakeTimeProvider time,
|
FakeTimeProvider time,
|
||||||
IMatchConnectionRegistry connections,
|
IMatchConnectionRegistry connections,
|
||||||
IMatchResultSink results)
|
IMatchResultSink results)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue