Skip to content

Commit ab7cea5

Browse files
committed
fixed test to expect a result after the LoadCredentials graceful failure change
1 parent d0f8ba0 commit ab7cea5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests.App/Services/CredentialManagerTest.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ public async Task SetDuringLoad(CancellationToken ct)
317317
var loadTask = manager.LoadCredentials(ct);
318318
// Then fully perform a set.
319319
await manager.SetCredentials(TestServerUrl, TestApiToken, ct).WaitAsync(ct);
320-
// The load should have been cancelled.
321-
Assert.ThrowsAsync<TaskCanceledException>(() => loadTask);
320+
321+
// The load should complete with the new valid credentials
322+
var result = await loadTask;
323+
Assert.That(result.State, Is.EqualTo(CredentialState.Valid));
324+
Assert.That(result.CoderUrl?.ToString(), Is.EqualTo(TestServerUrl));
322325
}
323326
}

0 commit comments

Comments
 (0)