refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
using Akka.Actor;
|
||||
using ZB.MOM.WW.ScadaBridge.ManagementService;
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.ManagementService.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Tests for the <see cref="ManagementActor"/> supervision strategy
|
||||
/// (finding ManagementService-005). The project convention is that long-lived
|
||||
/// coordinator-style actors declare an explicit Resume-based strategy.
|
||||
/// </summary>
|
||||
public class ManagementActorSupervisionTests
|
||||
{
|
||||
[Fact]
|
||||
public void CreateSupervisorStrategy_ReturnsOneForOneStrategy()
|
||||
{
|
||||
var strategy = ManagementActor.CreateSupervisorStrategy();
|
||||
|
||||
Assert.IsType<OneForOneStrategy>(strategy);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateSupervisorStrategy_ResumesOnArbitraryException()
|
||||
{
|
||||
var strategy = (OneForOneStrategy)ManagementActor.CreateSupervisorStrategy();
|
||||
|
||||
var directive = strategy.Decider.Decide(new InvalidOperationException("boom"));
|
||||
|
||||
Assert.Equal(Directive.Resume, directive);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateSupervisorStrategy_ResumesIndefinitely()
|
||||
{
|
||||
var strategy = (OneForOneStrategy)ManagementActor.CreateSupervisorStrategy();
|
||||
|
||||
// Coordinator actors should not give up: unbounded retries.
|
||||
Assert.Equal(-1, strategy.MaxNumberOfRetries);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user