feat: wire SQLite replication between site nodes and fix ConfigurationDatabase tests
Add SiteReplicationActor (runs on every site node) to replicate deployed configs and store-and-forward buffer operations to the standby peer via cluster member discovery and fire-and-forget Tell. Wire ReplicationService handler and pass replication actor to DeploymentManagerActor singleton. Fix 5 pre-existing ConfigurationDatabase test failures: RowVersion NOT NULL on SQLite, stale migration name assertion, and seed data count mismatch.
This commit is contained in:
@@ -21,13 +21,7 @@ public class DbContextTests : IDisposable
|
||||
|
||||
public DbContextTests()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder<ScadaLinkDbContext>()
|
||||
.UseSqlite("DataSource=:memory:")
|
||||
.Options;
|
||||
|
||||
_context = new ScadaLinkDbContext(options);
|
||||
_context.Database.OpenConnection();
|
||||
_context.Database.EnsureCreated();
|
||||
_context = SqliteTestHelper.CreateInMemoryContext();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -429,6 +423,6 @@ public class MigrationHelperTests : IDisposable
|
||||
{
|
||||
// Verify the InitialCreate migration is detected as pending
|
||||
var pending = _context.Database.GetPendingMigrations().ToList();
|
||||
Assert.Contains(pending, m => m.Contains("InitialCreate"));
|
||||
Assert.Contains(pending, m => m.Contains("InitialSchema"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user