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:
Joseph Doherty
2026-03-13 01:14:21 -04:00
parent 3445a055eb
commit e9c86c51c3
8 changed files with 36 additions and 13 deletions

View File

@@ -121,13 +121,22 @@ public sealed class JetStreamClusterFixture : IAsyncDisposable
/// Go ref: updateStream in jetstream_helpers_test.go.
/// </summary>
public JetStreamApiResponse UpdateStream(string name, string[] subjects, int replicas, int maxMsgs = 0)
=> _streamManager.CreateOrUpdate(new StreamConfig
{
// Preserve the existing stream's retention policy so ValidateConfigUpdate
// does not reject the update for changing an immutable field.
var retention = RetentionPolicy.Limits;
if (_streamManager.TryGet(name, out var existing))
retention = existing.Config.Retention;
return _streamManager.CreateOrUpdate(new StreamConfig
{
Name = name,
Subjects = [.. subjects],
Replicas = replicas,
MaxMsgs = maxMsgs,
Retention = retention,
});
}
/// <summary>
/// Returns the full stream info response.