< Summary - AsyncResponse (Release / net8.0+net10.0 / unit+integration)

Information
Class: AsyncResponse.AsyncResponseIndeterminateDeliveryException
Assembly: AsyncResponse.Abstractions
File(s): /home/runner/work/AsyncResponse/AsyncResponse/src/AsyncResponse.Abstractions/AsyncResponseIndeterminateDeliveryException.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 31
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/AsyncResponse/AsyncResponse/src/AsyncResponse.Abstractions/AsyncResponseIndeterminateDeliveryException.cs

#LineLine coverage
 1namespace AsyncResponse;
 2
 3/// <summary>
 4/// Faults a waiter's <see cref="IAsyncResponseWaiter{T}.ResponseTask"/> when disposal abandoned an
 5/// in-flight delivery without learning its outcome: the drain of a dispatch that had already
 6/// claimed a message — typically an <c>Until</c> predicate still running user code — did not finish
 7/// within the channel's <c>DisposalDrainTimeout</c>. The response may or may not have been consumed
 8/// from the channel.
 9/// <para>
 10/// This is deliberately <em>not</em> a cancellation. A canceled response task tells the caller
 11/// "nothing was delivered", which invites re-attaching to the correlation id — and if the wedged
 12/// delivery had consumed the message, that re-attached wait can never be answered. Treat the
 13/// awaiting step as indeterminate and restart it fresh (steps are idempotent);
 14/// <c>DurableFlowContext</c> does so automatically through its faulted-wait path.
 15/// </para>
 16/// </summary>
 17public sealed class AsyncResponseIndeterminateDeliveryException : Exception
 18{
 19    /// <summary>Runs the AsyncResponseIndeterminateDeliveryException operation.</summary>
 20    public AsyncResponseIndeterminateDeliveryException(string? correlationId, TimeSpan drainTimeout)
 321        : base($"Disposal abandoned an in-flight response delivery for correlationId '{correlationId}' " +
 322               $"after draining for {drainTimeout.TotalSeconds:0.###}s. The response may already have been " +
 323               "consumed from the channel; treat delivery as indeterminate and restart the awaiting " +
 324               "(idempotent) step instead of re-attaching to this correlation id.")
 25    {
 326        CorrelationId = correlationId;
 327    }
 28
 29    /// <summary>The correlation id whose delivery outcome is unknown.</summary>
 30    public string? CorrelationId { get; }
 31}

Methods/Properties

.ctor(string, System.TimeSpan)