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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user