aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2018-03-07 12:23:16 -0800
committerGravatar yang-g <yangg@google.com>2018-03-07 12:23:16 -0800
commit4a15f4016e840517d560427e656077f61103867f (patch)
tree4f0613f7700b97361094ac117fcb14528838767f /test/core/end2end
parentabd9d53a9f9ebe8eebfbca6e45fa9a18b466a8a8 (diff)
Fix test
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/tests/bad_ping.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/core/end2end/tests/bad_ping.cc b/test/core/end2end/tests/bad_ping.cc
index f305ea5703..95f72ca4c8 100644
--- a/test/core/end2end/tests/bad_ping.cc
+++ b/test/core/end2end/tests/bad_ping.cc
@@ -155,14 +155,15 @@ static void test_bad_ping(grpc_end2end_test_config config) {
cq_verify(cqv);
// Send too many pings to the server to trigger the punishment:
- // Each ping will trigger a ping strike, and we need at least MAX_PING_STRIKES
- // strikes to trigger the punishment. So (MAX_PING_STRIKES + 1) pings are
+ // The first ping will let server mark its last_recv time. Afterwards, each
+ // ping will trigger a ping strike, and we need at least MAX_PING_STRIKES
+ // strikes to trigger the punishment. So (MAX_PING_STRIKES + 2) pings are
// needed here.
int i;
- for (i = 1; i <= MAX_PING_STRIKES + 1; i++) {
+ for (i = 1; i <= MAX_PING_STRIKES + 2; i++) {
grpc_channel_ping(f.client, f.cq, tag(200 + i), nullptr);
CQ_EXPECT_COMPLETION(cqv, tag(200 + i), 1);
- if (i == MAX_PING_STRIKES + 1) {
+ if (i == MAX_PING_STRIKES + 2) {
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
}
cq_verify(cqv);