What
Upgrading StackExchange.Redis from 2.8.16 to 2.13.17 makes RedisIngestionStreamTests.ConsumeAsync_WithPoisonEntry_AcksAsynchronouslyAndStillYieldsValidEntries hang forever. This blocks the grouped nuget dependency PR (#344) — its backend CI check never completes — and Dependabot has been told to ignore StackExchange.Redis this minor version so the other 27 packages in that group can land. That ignore is a workaround, not a fix: we are now pinned to 2.8.x until this is resolved.
Where
Proxytrace.Messaging/Internal/RedisIngestionStream.cs:73 — the StreamReadGroupAsync call
Proxytrace.Messaging.Tests/RedisIngestionStreamTests.cs:59 — the hanging test
Proxytrace.Messaging/Proxytrace.Messaging.csproj:17 — the pinned version
Why it matters
We cannot take StackExchange.Redis updates (including any future security patch) while this stands. A hung test is also worse than a failing one: it wedges the whole dotnet test Proxytrace.sln run and the CI backend job (see the companion issue on the missing job timeout).
Repro / evidence
Bisected locally:
| Configuration |
Result |
| master (Redis 2.8.16) |
9/9 pass, 346 ms |
| PR #344 branch (Redis 2.13.17) |
hangs > 7 min, killed |
| PR #344 branch, Redis pinned back to 2.8.16 |
9/9 pass, 349 ms |
| PR #344 branch, Redis 2.8.16, full solution |
2381 passed, 0 failed |
MSTest 4.3.0 (also in that group) is not the cause — Proxytrace.Common.Tests (184 tests) passes in 848 ms on the same branch. Narrowed within the project: the 6 non-Redis tests pass in 116 ms; of the 3 Redis tests, only ConsumeAsync_WithPoisonEntry_... hangs.
Cause
RedisIngestionStream calls the 5-argument overload:
StreamEntry[] entries = await Database.StreamReadGroupAsync(
configuration.Stream,
configuration.ConsumerGroup,
configuration.ConsumerName,
StreamPosition.NewMessages,
count: configuration.BatchSize);
while the test stubs the 7-parameter overload (RedisKey, RedisValue, RedisValue, RedisValue?, int?, bool, CommandFlags). StackExchange.Redis 2.13 changed the overload set, so the call no longer binds to the stubbed overload. The NSubstitute mock therefore returns an empty batch on every iteration, the consumer polls forever, and the test's await foreach — which only cancels after it receives the first valid entry — never terminates.
Suggested fix
Update RedisIngestionStreamTests to stub whichever overload 2.13's IDatabase actually exposes for our call (or pin the call to an explicit overload), then re-verify against a real Redis, since an overload change may also carry a semantic change. Guard the test with a timeout so a future binding mismatch fails fast instead of hanging.
What
Upgrading
StackExchange.Redisfrom 2.8.16 to 2.13.17 makesRedisIngestionStreamTests.ConsumeAsync_WithPoisonEntry_AcksAsynchronouslyAndStillYieldsValidEntrieshang forever. This blocks the grouped nuget dependency PR (#344) — itsbackendCI check never completes — and Dependabot has been told toignore StackExchange.Redis this minor versionso the other 27 packages in that group can land. That ignore is a workaround, not a fix: we are now pinned to 2.8.x until this is resolved.Where
Proxytrace.Messaging/Internal/RedisIngestionStream.cs:73— theStreamReadGroupAsynccallProxytrace.Messaging.Tests/RedisIngestionStreamTests.cs:59— the hanging testProxytrace.Messaging/Proxytrace.Messaging.csproj:17— the pinned versionWhy it matters
We cannot take StackExchange.Redis updates (including any future security patch) while this stands. A hung test is also worse than a failing one: it wedges the whole
dotnet test Proxytrace.slnrun and the CI backend job (see the companion issue on the missing job timeout).Repro / evidence
Bisected locally:
MSTest 4.3.0 (also in that group) is not the cause —
Proxytrace.Common.Tests(184 tests) passes in 848 ms on the same branch. Narrowed within the project: the 6 non-Redis tests pass in 116 ms; of the 3 Redis tests, onlyConsumeAsync_WithPoisonEntry_...hangs.Cause
RedisIngestionStreamcalls the 5-argument overload:while the test stubs the 7-parameter overload (
RedisKey, RedisValue, RedisValue, RedisValue?, int?, bool, CommandFlags). StackExchange.Redis 2.13 changed the overload set, so the call no longer binds to the stubbed overload. The NSubstitute mock therefore returns an empty batch on every iteration, the consumer polls forever, and the test'sawait foreach— which only cancels after it receives the first valid entry — never terminates.Suggested fix
Update
RedisIngestionStreamTeststo stub whichever overload 2.13'sIDatabaseactually exposes for our call (or pin the call to an explicit overload), then re-verify against a real Redis, since an overload change may also carry a semantic change. Guard the test with a timeout so a future binding mismatch fails fast instead of hanging.