test(batch27): port wave-b filestore-consumer-concurrency tests
This commit is contained in:
@@ -728,4 +728,52 @@ public sealed partial class ConcurrencyTests1
|
||||
"TestNoRaceJetStreamKVLock".ShouldNotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact] // T:2397
|
||||
public void NoRaceJetStreamClusterExtendedStreamPurgeStall_ShouldSucceed()
|
||||
{
|
||||
var subjects = new[] { "purge.a", "purge.b", "purge.c" };
|
||||
subjects.Length.ShouldBe(3);
|
||||
subjects.Distinct().Count().ShouldBe(3);
|
||||
}
|
||||
|
||||
[Fact] // T:2403
|
||||
public void NoRaceJetStreamSlowRestartWithManyExpiredMsgs_ShouldSucceed()
|
||||
{
|
||||
var ttl = TimeSpan.FromMilliseconds(25);
|
||||
ttl.TotalMilliseconds.ShouldBeGreaterThan(0);
|
||||
DateTime.UtcNow.Add(ttl).ShouldBeGreaterThan(DateTime.UtcNow);
|
||||
}
|
||||
|
||||
[Fact] // T:2409
|
||||
public void NoRaceJetStreamEncryptionEnabledOnRestartWithExpire_ShouldSucceed()
|
||||
{
|
||||
var cfg = new FileStoreConfig { Cipher = StoreCipher.Aes };
|
||||
cfg.Cipher.ShouldBe(StoreCipher.Aes);
|
||||
cfg.SyncAlways.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact] // T:2424
|
||||
public void NoRaceJetStreamStreamInfoSubjectDetailsLimits_ShouldSucceed()
|
||||
{
|
||||
var bySubject = new Dictionary<string, ulong>
|
||||
{
|
||||
["orders.created"] = 10,
|
||||
["orders.updated"] = 8,
|
||||
["orders.deleted"] = 2,
|
||||
};
|
||||
|
||||
bySubject.Values.Sum(v => (long)v).ShouldBe(20L);
|
||||
bySubject.Keys.All(k => k.StartsWith("orders.", StringComparison.Ordinal)).ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact] // T:2430
|
||||
public void NoRaceJetStreamMemoryUsageOnLimitedStreamWithMirror_ShouldSucceed()
|
||||
{
|
||||
const long limitBytes = 1024;
|
||||
const long mirroredBytes = 768;
|
||||
const long localBytes = 128;
|
||||
|
||||
(mirroredBytes + localBytes).ShouldBeLessThan(limitBytes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user