Skip to content

Commit

Permalink
update test by comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nytian committed Nov 5, 2024
1 parent 3b078b8 commit 12f143f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,11 @@ public async Task TestWaitForCompletionOrCreateCheckStatusResponseAsync_WhenRunn
var client = this.GetTestFunctionsDurableTaskClient(orchestrationMetadata: expectedResult);

HttpRequestData request = this.MockHttpRequestAndResponseData();
CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(10));
HttpResponseData response = await client.WaitForCompletionOrCreateCheckStatusResponseAsync(request, instanceId, cancellation : cts.Token);
HttpResponseData response;
using (CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(10)))
{
response = await client.WaitForCompletionOrCreateCheckStatusResponseAsync(request, instanceId, cancellation: cts.Token);
};

Assert.NotNull(response);
Assert.Equal(HttpStatusCode.Accepted, response.StatusCode);
Expand Down

0 comments on commit 12f143f

Please sign in to comment.