Table of Contents

Method RunUntilIdleAsync

Namespace
Millrace.Testing
Assembly
Millrace.Testing.dll

RunUntilIdleAsync(bool, CancellationToken)

Runs every claimable job to completion, including work that running them enqueues.

public ValueTask<int> RunUntilIdleAsync(bool throwOnFailure = true, CancellationToken ct = default)

Parameters

throwOnFailure bool

When true (the default) a job that exhausts its retries rethrows here, so a broken job fails the test loudly instead of leaving an unexplained assertion failure later. Pass false when the failure is the thing under test.

ct CancellationToken

Returns

ValueTask<int>

How many job executions ran — retries counted separately.

Exceptions

MillraceJobFailedException

A job exhausted its retries and throwOnFailure is true.