aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end/test_service_impl.cc
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2017-10-10 11:31:29 -0700
committerGravatar Vijay Pai <vpai@google.com>2017-10-10 14:59:32 -0700
commit9f10a587a9f92ed5750334ad98b00eafc1ae97de (patch)
tree3ca544e17839ff1050ab43246e81e34a0bd07f0b /test/cpp/end2end/test_service_impl.cc
parent451d312c8029d5d47eb1fd3cac2a641f1235cf5d (diff)
Make short deadlines actually expire
Diffstat (limited to 'test/cpp/end2end/test_service_impl.cc')
-rw-r--r--test/cpp/end2end/test_service_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc
index 4fa98c24f5..156ff8308e 100644
--- a/test/cpp/end2end/test_service_impl.cc
+++ b/test/cpp/end2end/test_service_impl.cc
@@ -73,6 +73,10 @@ void CheckServerAuthContext(
Status TestServiceImpl::Echo(ServerContext* context, const EchoRequest* request,
EchoResponse* response) {
+ // A bit of sleep to make sure that short deadline tests fail
+ gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
+ gpr_time_from_millis(2, GPR_TIMESPAN)));
+
if (request->has_param() && request->param().server_die()) {
gpr_log(GPR_ERROR, "The request should not reach application handler.");
GPR_ASSERT(0);