feat(client): standardize connection outcomes (#13)
quality-gate / quality (push) Successful in 59s
quality-gate / quality (push) Successful in 59s
This commit is contained in:
@@ -242,6 +242,11 @@ public sealed class RendezvousCoordinatorIntegrationTests
|
||||
|
||||
private sealed class FakeJoinClient(IReadOnlyList<HostJoinAttempt> attempts) : IRendezvousJoinClient
|
||||
{
|
||||
public Task<RendezvousConnectionStartResult> CreateConnectionAttemptAsync(
|
||||
CreateJoinAttemptRequest request,
|
||||
NetworkEndpoint? dedicatedFallback = null,
|
||||
CancellationToken cancellationToken = default) => throw new NotSupportedException();
|
||||
|
||||
public Task<RendezvousClientResult<CreateJoinAttemptResponse>> CreateAsync(
|
||||
CreateJoinAttemptRequest request,
|
||||
CancellationToken cancellationToken = default) => throw new NotSupportedException();
|
||||
@@ -261,6 +266,11 @@ public sealed class RendezvousCoordinatorIntegrationTests
|
||||
int maximumPages = 100,
|
||||
CancellationToken cancellationToken = default) => Task.FromResult(
|
||||
RendezvousClientResult.Success(attempts));
|
||||
|
||||
public Task<RendezvousClientResult<ReportConnectionOutcomeResponse>> ReportOutcomeAsync(
|
||||
CreateJoinAttemptResponse attempt,
|
||||
RendezvousConnectionOutcome outcome,
|
||||
CancellationToken cancellationToken = default) => throw new NotSupportedException();
|
||||
}
|
||||
|
||||
private sealed class FixedCoordinatorClock(DateTimeOffset now) :
|
||||
@@ -268,5 +278,6 @@ public sealed class RendezvousCoordinatorIntegrationTests
|
||||
IConnectionTicketClock
|
||||
{
|
||||
public DateTimeOffset UtcNow { get; } = now;
|
||||
public TimeSpan Elapsed => TimeSpan.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user