Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
terencefan committed Oct 24, 2023
1 parent cd929a9 commit 7b4bbff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public async Task TestUpdateAccessKeyShouldSkip(bool isAuthorized, int timeElaps
}
else
{
await Assert.ThrowsAsync<TaskCanceledException>(async () => await key.UpdateAccessKeyAsync(source.Token));
await Assert.ThrowsAsync<OperationCanceledException>(async () => await key.UpdateAccessKeyAsync(source.Token));
Assert.False((bool)isAuthorizedField.GetValue(key));
Assert.True(lastUpdatedTime < (DateTime)lastUpdatedTimeField.GetValue(key));
Assert.True(initializedTcs.Task.IsCompleted);
Expand All @@ -104,7 +104,7 @@ public async Task TestInitializeFailed()
);

var source = new CancellationTokenSource(TimeSpan.FromSeconds(1));
await Assert.ThrowsAnyAsync<TaskCanceledException>(
await Assert.ThrowsAnyAsync<OperationCanceledException>(
async () => await key.UpdateAccessKeyAsync(source.Token)
);

Expand Down

0 comments on commit 7b4bbff

Please sign in to comment.