Skip to content

[DO NOT MERGE] Remove EmulatorFlaky trait -- use adaptive concurrency instead#66

Draft
McNultyyy wants to merge 2 commits into
mainfrom
mcnultyyy/fix-emulator-flaky-trait
Draft

[DO NOT MERGE] Remove EmulatorFlaky trait -- use adaptive concurrency instead#66
McNultyyy wants to merge 2 commits into
mainfrom
mcnultyyy/fix-emulator-flaky-trait

Conversation

@McNultyyy
Copy link
Copy Markdown
Collaborator

Description

The EmulatorFlaky trait was blanket-excluding 12 tests (Issue18EdgeCaseIntegrationTests) from all emulator CI runs, creating a gap where emulator-specific regressions could go undetected.

The root cause was a single test (ConcurrentReadsOfNonExistent) firing 50 parallel requests that overwhelmed the emulator's partition service with 503 "high demand" errors. Rather than excluding the entire class, this PR makes the concurrency adaptive based on the test target:

  • In-memory: 50 concurrent reads (fast, no resource constraints)
  • Emulator targets: 10 concurrent reads (same behavioral assertion, volume the emulator can handle)

This removes the EmulatorFlaky concept entirely -- all tests now run against all targets with no exclusions beyond InMemoryOnly.

Related Issue

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Tests added/updated (TDD: failing test first, then implementation)
  • All tests pass (dotnet test) -- 7701 unit + 292 integration pass
  • No new warnings introduced

McNultyyy and others added 2 commits May 19, 2026 08:12
The EmulatorFlaky trait was blanket-excluding 12 tests from all emulator
runs, creating a regression gap. The root cause was a single test
(ConcurrentReadsOfNonExistent) overwhelming the emulator with 50 parallel
requests.

Instead of excluding the entire class, make the concurrency adaptive:
- 50 concurrent reads for in-memory (fast, no resource constraints)
- 10 concurrent reads for emulator targets (same assertion, lower volume)

Changes:
- Remove [Trait(TestTraits.Target, TestTraits.EmulatorFlaky)] from
  Issue18EdgeCaseIntegrationTests
- Remove EmulatorFlaky constant from TestTraits.cs
- Remove Target!=EmulatorFlaky filter from scripts/run-tests.ps1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Windows emulator can return 404 with substatus 0 during an
intermediate startup state (between 403/1008 and fully ready). This was
causing the EmulatorWarmup tool and EmulatorRetry to treat it as fatal,
failing the parity workflow before tests even ran.

Add 404/0 to the transient error set in both:
- tests/EmulatorWarmup/Program.cs (warmup tool)
- tests/.../EmulatorSession.cs (shared retry helper)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@McNultyyy McNultyyy changed the title Remove EmulatorFlaky trait -- use adaptive concurrency instead [DO NOT MERGE] Remove EmulatorFlaky trait -- use adaptive concurrency instead May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant