feat(dcl): add failover state machine to DataConnectionActor with round-robin endpoint switching
This commit is contained in:
@@ -23,12 +23,14 @@ public class DataConnectionActorTests : TestKit
|
||||
private readonly IDataConnection _mockAdapter;
|
||||
private readonly DataConnectionOptions _options;
|
||||
private readonly ISiteHealthCollector _mockHealthCollector;
|
||||
private readonly IDataConnectionFactory _mockFactory;
|
||||
|
||||
public DataConnectionActorTests()
|
||||
: base(@"akka.loglevel = DEBUG")
|
||||
{
|
||||
_mockAdapter = Substitute.For<IDataConnection>();
|
||||
_mockHealthCollector = Substitute.For<ISiteHealthCollector>();
|
||||
_mockFactory = Substitute.For<IDataConnectionFactory>();
|
||||
_options = new DataConnectionOptions
|
||||
{
|
||||
ReconnectInterval = TimeSpan.FromMilliseconds(100),
|
||||
@@ -40,7 +42,8 @@ public class DataConnectionActorTests : TestKit
|
||||
private IActorRef CreateConnectionActor(string name = "test-conn")
|
||||
{
|
||||
return Sys.ActorOf(Props.Create(() =>
|
||||
new DataConnectionActor(name, _mockAdapter, _options, _mockHealthCollector)), name);
|
||||
new DataConnectionActor(name, _mockAdapter, _options, _mockHealthCollector,
|
||||
_mockFactory, "OpcUa")), name);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user