fix: resolve 19 JetStream test failures across 5 root causes
- HandleList: populate StreamNames/ConsumerNames alongside info lists - ValidateConfigUpdate: allow clearing mirror/sources, accept even replicas - ToWireFormat: add AccountInfo branch for $JS.API.INFO responses - UpdateStream fixture: preserve existing retention policy on update - Integration test: fix assertion to match valid account info response
This commit is contained in:
@@ -278,10 +278,10 @@ public class ConfigUpdateValidationTests
|
||||
errors.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
// Go ref: server/stream.go — RAFT consensus requires an odd number of replicas.
|
||||
// Setting replicas to an even number must be rejected.
|
||||
// Go ref: server/stream.go — Go server supports even replica counts (e.g., R2).
|
||||
// Even replicas should be accepted by config update validation.
|
||||
[Fact]
|
||||
public void ValidateConfigUpdate_rejects_even_replicas()
|
||||
public void ValidateConfigUpdate_accepts_even_replicas()
|
||||
{
|
||||
var existing = new StreamConfig
|
||||
{
|
||||
@@ -300,7 +300,7 @@ public class ConfigUpdateValidationTests
|
||||
|
||||
var errors = StreamManager.ValidateConfigUpdate(existing, proposed);
|
||||
|
||||
errors.ShouldContain(e => e.Contains("replicas must be odd"));
|
||||
errors.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
// Go ref: server/stream.go:1500-1600 (stream.update) — integration via StreamManager.
|
||||
|
||||
@@ -12,7 +12,7 @@ public class JetStreamApiProtocolIntegrationTests
|
||||
await using var server = await ServerFixture.StartJetStreamEnabledAsync();
|
||||
var response = await server.RequestAsync("$JS.API.INFO", "{}", timeoutMs: 1000);
|
||||
|
||||
response.ShouldContain("\"error\"");
|
||||
response.ShouldContain("\"streams\"");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user