diff options
author | Craig Tiller <ctiller@google.com> | 2016-01-27 10:45:50 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-01-27 10:45:50 -0800 |
commit | b0f275e4af3a18882110994713368eb288594b66 (patch) | |
tree | 749dc2e86a2a4ededca3b33ab041daff4f339fd9 /test/cpp | |
parent | 7c43f4909242b62881389c7d4cfc9541c70151b6 (diff) |
Small testing fixes
- end2end test deadlines may complete before checking IsCancelled
=> don't expect it to be false in these cases
- add exponential backoff to port_posix
- ensure run_tests rebuilds targets with a regex I commonly use
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/end2end/end2end_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index f8027bcf0b..6303d2cc13 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -244,7 +244,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service { gpr_time_from_micros(request->param().server_cancel_after_us(), GPR_TIMESPAN))); return Status::CANCELLED; - } else { + } else if (!request->has_param() || !request->param().skip_cancelled_check()) { EXPECT_FALSE(context->IsCancelled()); } @@ -823,6 +823,7 @@ TEST_P(ProxyEnd2endTest, RpcDeadlineExpires) { EchoRequest request; EchoResponse response; request.set_message("Hello"); + request.mutable_param()->set_skip_cancelled_check(true); ClientContext context; std::chrono::system_clock::time_point deadline = |