Skip to content

Commit

Permalink
Fix cancellation test flakiness (#27036)
Browse files Browse the repository at this point in the history
Remove assertions that QueryIterationFailed doesn't appear in the logs,
since it may be there because of transient failures from previous
retries.

Fixes #27033
  • Loading branch information
roji authored Dec 18, 2021
1 parent d5cac5b commit 5c4d159
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5640,7 +5640,6 @@ public virtual async Task ToListAsync_can_be_canceled()
{
Assert.Null(result);
Assert.Contains(CoreEventId.QueryCanceled, Fixture.ListLoggerFactory.Log.Select(l => l.Id));
Assert.DoesNotContain(CoreEventId.QueryIterationFailed, Fixture.ListLoggerFactory.Log.Select(l => l.Id));
}
else
{
Expand All @@ -5657,7 +5656,6 @@ public virtual async Task ToListAsync_with_canceled_token()
await Assert.ThrowsAsync<OperationCanceledException>(() => context.Employees.ToListAsync(new CancellationToken(true)));

Assert.Contains(CoreEventId.QueryCanceled, Fixture.ListLoggerFactory.Log.Select(l => l.Id));
Assert.DoesNotContain(CoreEventId.QueryIterationFailed, Fixture.ListLoggerFactory.Log.Select(l => l.Id));
}

[ConditionalFact(Skip = "Issue #17019")]
Expand Down

0 comments on commit 5c4d159

Please sign in to comment.