test: restore MaxAgeMs values in cluster tests after timestamp fix

Now that MemStore uses Unix epoch timestamps (13a3f81), restore the
original Go MaxAge values that were previously omitted as workarounds:
- JsCluster2: MaxAgeMs=500 (Go: 500ms)
- JsCluster34: MaxAgeMs=5000 (Go: 5s)
This commit is contained in:
Joseph Doherty
2026-02-24 23:11:30 -05:00
parent 13a3f81d7e
commit c4c9ddfe24
2 changed files with 18 additions and 14 deletions

View File

@@ -28,13 +28,16 @@ public class JsCluster34GoParityTests
// Go: TestJetStreamClusterStreamMaxAgeScaleUp — jetstream_cluster_3_test.go:3001
// After scale-up the replica group is re-created with the new replica count.
// Messages published before scale-up must still be present.
// Note: MaxAgeMs is omitted because the .NET MemStore uses Ticks*100 nanosecond
// timestamps that overflow long, causing immediate message expiration in tests.
// The core behavior under test is that messages survive scale-up.
// Go: MaxAge = 5s
await using var cluster = await JetStreamClusterFixture.StartAsync(3);
// Use CreateStreamAsync (MaxAgeMs=0, no pruning) to test scale-up message preservation.
var createResp = await cluster.CreateStreamAsync("SCALEAGE", ["sa.>"], replicas: 1);
var createResp = cluster.CreateStreamDirect(new StreamConfig
{
Name = "SCALEAGE",
Subjects = ["sa.>"],
Replicas = 1,
MaxAgeMs = 5_000,
});
createResp.Error.ShouldBeNull();
for (var i = 0; i < 10; i++)