Skip to content

.NET: [Bug]: Stabilize Foundry recovery test checkpoint synchronization #7816

Description

Description

StoppedHost_RecoversWorkflowWithCompleteOrderedOutputAsync intermittently fails because it waits for the live HTTP response to contain 6, 5, and 4, then immediately reads the durable response file. AgentServer exposes the live response before processing the next checkpoint control event, so the file can still contain only 6 and 5 when the host stops.

Expected behavior: the test should wait until the durable checkpoint contains the expected output before stopping the first host.

Steps to reproduce:

  1. Run the affected test repeatedly.
  2. Observe that the HTTP response can reach the expected output before the durable response file does.
  3. The assertion then compares 6, 5, and 4 with the older persisted output 6 and 5.

Error Messages / Stack Traces

Assert.Equal() Failure: Collections differ
Expected: ["6", "5", "4"]
Actual:   ["6", "5"]

Package Versions

Repository unit tests for Microsoft.Agents.AI.Foundry.Hosting.

.NET Version

.NET 10

Additional Context

Observed in https://github.com/microsoft/agent-framework/actions/runs/32568081110/job/97019549905.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETUsage: [Issues, PRs], Target: .Net

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions