Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
tolerate occasional StatusCode.Internal on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Aug 4, 2015
1 parent 847dfff commit 0175e18
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/csharp/Grpc.Core.Tests/TimeoutsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ public void DeadlineInThePast()
}
catch (RpcException e)
{
Assert.AreEqual(StatusCode.DeadlineExceeded, e.Status.StatusCode);
// We can't guarantee the status code always DeadlineExceeded. See issue #2685.
Assert.Contains(e.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });
}
}

Expand All @@ -151,7 +152,8 @@ public void DeadlineExceededStatusOnTimeout()
}
catch (RpcException e)
{
Assert.AreEqual(StatusCode.DeadlineExceeded, e.Status.StatusCode);
// We can't guarantee the status code always DeadlineExceeded. See issue #2685.
Assert.Contains(e.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });
}
}

Expand All @@ -168,7 +170,8 @@ public void ServerReceivesCancellationOnTimeout()
}
catch (RpcException e)
{
Assert.AreEqual(StatusCode.DeadlineExceeded, e.Status.StatusCode);
// We can't guarantee the status code is always DeadlineExceeded. See issue #2685.
Assert.Contains(e.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });
}
Assert.AreEqual("CANCELLED", stringFromServerHandlerTcs.Task.Result);
}
Expand Down

0 comments on commit 0175e18

Please sign in to comment.