run test on phase 24 and 33

This commit is contained in:
voltsrage
2026-06-24 04:35:15 +08:00
parent 68c397350b
commit 279add1e45
45 changed files with 732 additions and 99 deletions
@@ -85,13 +85,22 @@ public class NotificationPipelineTests : IAsyncLifetime
[Fact]
public async Task CriticalAlert_Unacknowledged_EscalatesAfterTimeout()
{
using (var scope = _fixture.Services.CreateScope())
{
var rabbitOpts = scope.ServiceProvider.GetRequiredService<IOptions<RabbitMqOptions>>();
RabbitMqTestHelper.PurgeNotificationQueues(rabbitOpts);
await RabbitMqTestHelper.WaitForNotificationPipelineIdleAsync(
rabbitOpts, TimeSpan.FromSeconds(90));
RabbitMqTestHelper.PurgeNotificationQueues(rabbitOpts);
}
var encounterId = await CreateActiveEncounterAsync();
var alertId = await IngestCriticalPotassiumAsync(encounterId);
// paging worker (≤6s) → DLQ (5s TTL) → escalation worker.
// Poll instead of a fixed sleep: earlier tests may leave paging jobs queued
// (prefetch=1), so wall-clock time varies across the full integration suite.
var deadline = DateTimeOffset.UtcNow.AddSeconds(60);
var perAlertCycle = TimeSpan.FromMilliseconds(
_fixture.Services.GetRequiredService<IOptions<RabbitMqOptions>>().Value.PagingAckTimeoutMs * 2 + 12_000);
var deadline = DateTimeOffset.UtcNow.Add(perAlertCycle);
AlertStatus status;
do
{