Skip to content

fix(scheduler): fix test job-completion polling - #2354

Open
NoahKusaba wants to merge 1 commit into
apache:mainfrom
NoahKusaba:fix/scheduler-test-poll-spin
Open

fix(scheduler): fix test job-completion polling #2354
NoahKusaba wants to merge 1 commit into
apache:mainfrom
NoahKusaba:fix/scheduler-test-poll-spin

Conversation

@NoahKusaba

@NoahKusaba NoahKusaba commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

The job-completion poll loop in SchedulerTest::run_with_subscriber used _ => continue,
which skips the sleep(100) below the match. Once a job reports a non-terminal status the
loop polls with no delay and spins a core until the job finishes.

await_completion and await_completion_timeout had the same bug and no callers.

What changes are included in this PR?

  • run_with_subscriber: collapsed the inner match into the outer if let so
    non-terminal statuses fall through to the sleep.
  • Deleted await_completion and await_completion_timeout (no callers).

We can also not delete the unused functions, but this is a very clear bug regardless.

Are there any user-facing changes?

No

@NoahKusaba NoahKusaba changed the title fix(scheduler): fix test job-completion polling — honour interval, drop dead helpers fix(scheduler): fix test job-completion polling Aug 22, 2026

@milenkovicm milenkovicm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @NoahKusaba good catch

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.

2 participants