fix(grpc-data): H2 review 8 - history timeout rides the artifact, not the trust-scope fingerprint
DataConnectionScopeRevision covers consumer/connection/secret scope only; limits (TimeoutMilliseconds and now HistoryTimeoutMilliseconds) reach DB-less nodes and the LocalDb cache in the artifact's entity JSON. Dropping the field also avoids a one-time scope-version bump on upgrade. Plan 6 corrected.
This commit is contained in:
+7
-5
@@ -67,18 +67,20 @@ public sealed class GrpcDataHistoryConfigurationTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void The_scope_revision_includes_the_history_timeout()
|
||||
public void Limits_ride_the_artifact_so_the_trust_scope_revision_ignores_the_history_timeout()
|
||||
{
|
||||
// The scope fingerprint covers credential/trust scope only (consumer, connection, secret); limits such as
|
||||
// TimeoutMilliseconds and HistoryTimeoutMilliseconds travel in the artifact's entity JSON (GrpcDataArtifactReadTests).
|
||||
var connection = new DataConnection
|
||||
{
|
||||
DataConnectionId = "c", ClusterId = "a", Enabled = true, ConsumerNodeIds = ["n"], SecretScopeClusterId = "a", SecretReference = "s",
|
||||
};
|
||||
var first = DataConnectionScopeRevision.Advance(0, null, [connection]);
|
||||
DataConnectionScopeRevision.Advance(first.Version, first.Fingerprint, [connection]).Version.ShouldBe(first.Version);
|
||||
connection.HistoryTimeoutMilliseconds = 5000;
|
||||
var changed = DataConnectionScopeRevision.Advance(first.Version, first.Fingerprint, [connection]);
|
||||
changed.Fingerprint.ShouldNotBe(first.Fingerprint);
|
||||
changed.Version.ShouldBe(first.Version + 1);
|
||||
connection.TimeoutMilliseconds = 7000;
|
||||
var same = DataConnectionScopeRevision.Advance(first.Version, first.Fingerprint, [connection]);
|
||||
same.Fingerprint.ShouldBe(first.Fingerprint);
|
||||
same.Version.ShouldBe(first.Version);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user