Implement in-process multi-dataset sync isolation across core, network, persistence, and tests
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m14s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m14s
This commit is contained in:
@@ -39,18 +39,21 @@ public class SyncOrchestratorConfirmationTests
|
||||
"peer-a",
|
||||
"10.0.0.1:9000",
|
||||
PeerType.LanDiscovered,
|
||||
DatasetId.Primary,
|
||||
Arg.Any<CancellationToken>());
|
||||
|
||||
await confirmationStore.Received(1).EnsurePeerRegisteredAsync(
|
||||
"peer-b",
|
||||
"10.0.0.2:9010",
|
||||
PeerType.StaticRemote,
|
||||
DatasetId.Primary,
|
||||
Arg.Any<CancellationToken>());
|
||||
|
||||
await confirmationStore.DidNotReceive().EnsurePeerRegisteredAsync(
|
||||
"local",
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<PeerType>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
@@ -89,6 +92,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
"peer-new",
|
||||
"10.0.0.25:9010",
|
||||
PeerType.LanDiscovered,
|
||||
DatasetId.Primary,
|
||||
Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
@@ -114,9 +118,9 @@ public class SyncOrchestratorConfirmationTests
|
||||
remote.SetTimestamp("node-behind", new HlcTimestamp(299, 9, "node-behind"));
|
||||
remote.SetTimestamp("node-remote-only", new HlcTimestamp(900, 0, "node-remote-only"));
|
||||
|
||||
oplogStore.GetLastEntryHashAsync("node-equal", Arg.Any<CancellationToken>())
|
||||
oplogStore.GetLastEntryHashAsync("node-equal", DatasetId.Primary, Arg.Any<CancellationToken>())
|
||||
.Returns("hash-equal");
|
||||
oplogStore.GetLastEntryHashAsync("node-ahead", Arg.Any<CancellationToken>())
|
||||
oplogStore.GetLastEntryHashAsync("node-ahead", DatasetId.Primary, Arg.Any<CancellationToken>())
|
||||
.Returns((string?)null);
|
||||
|
||||
await orchestrator.AdvanceConfirmationsFromVectorClockAsync("peer-1", local, remote, CancellationToken.None);
|
||||
@@ -126,6 +130,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
"node-equal",
|
||||
new HlcTimestamp(100, 1, "node-equal"),
|
||||
"hash-equal",
|
||||
DatasetId.Primary,
|
||||
Arg.Any<CancellationToken>());
|
||||
|
||||
await confirmationStore.Received(1).UpdateConfirmationAsync(
|
||||
@@ -133,6 +138,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
"node-ahead",
|
||||
new HlcTimestamp(200, 0, "node-ahead"),
|
||||
string.Empty,
|
||||
DatasetId.Primary,
|
||||
Arg.Any<CancellationToken>());
|
||||
|
||||
await confirmationStore.DidNotReceive().UpdateConfirmationAsync(
|
||||
@@ -140,6 +146,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
"node-behind",
|
||||
Arg.Any<HlcTimestamp>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<CancellationToken>());
|
||||
|
||||
await confirmationStore.DidNotReceive().UpdateConfirmationAsync(
|
||||
@@ -147,6 +154,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
"node-local-only",
|
||||
Arg.Any<HlcTimestamp>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<CancellationToken>());
|
||||
|
||||
await confirmationStore.DidNotReceive().UpdateConfirmationAsync(
|
||||
@@ -154,6 +162,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
"node-remote-only",
|
||||
Arg.Any<HlcTimestamp>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
@@ -182,6 +191,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
"source-1",
|
||||
new HlcTimestamp(120, 1, "source-1"),
|
||||
"hash-120",
|
||||
DatasetId.Primary,
|
||||
Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
@@ -206,6 +216,7 @@ public class SyncOrchestratorConfirmationTests
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<HlcTimestamp>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
@@ -245,4 +256,4 @@ public class SyncOrchestratorConfirmationTests
|
||||
string.Empty,
|
||||
hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user