Skip to content

Commit

Permalink
Reset exception count on success
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Apr 11, 2024
1 parent fbec4ce commit 6134120
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/Grpc.Net.Client.Tests/Balancer/ResolverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ public async Task PickAsync_ErrorWhenInParallelWithUpdateChannelState()
var counter = 0;
var exceptionsCounter = 0;
while (counter < 1000)
while (counter < 3000)
{
// short delay
await Task.Delay(20);
Expand All @@ -623,6 +623,8 @@ public async Task PickAsync_ErrorWhenInParallelWithUpdateChannelState()
waitForReady: false,
CancellationToken.None);
exceptionsCounter = 0;
logger.LogInformation(
"[ {Counter} ] PickAsync result: subchannel = `{Subchannel}`, address = `{Address}`",
counter,
Expand All @@ -643,11 +645,11 @@ public async Task PickAsync_ErrorWhenInParallelWithUpdateChannelState()
break;
// restart renew to show that renews to _different_ addresses can fix errors
case > 5 and < 50:
case > 5 and < 200:
CustomResolver.RestartRenew();
break;
case > 50:
case > 200:
throw;
}
}
Expand Down

0 comments on commit 6134120

Please sign in to comment.