Skip to content

test: add unit test for channel-close → GraphStatus::Failed transition in run_scheduler_loop #1614

@bug-ops

Description

@bug-ops

Context

run_scheduler_loop() (modified in #1603) exits with GraphStatus::Failed when the channel is closed (Ok(None) or Err(_) from channel.recv()). This transition is not directly tested.

Acceptance criteria

A #[tokio::test] that:

  1. Builds an agent with a MockChannel that immediately returns Ok(None) from recv()
  2. Runs run_scheduler_loop() with an active graph
  3. Asserts the returned status is GraphStatus::Failed

Note: MockChannel::new(vec![]) already returns Ok(None) when the message list is empty, so this test can be simple.

Labels

enhancement, testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions