diff options
author | David Garcia Quintas <dgq@google.com> | 2016-08-02 16:37:41 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-08-02 16:37:41 -0700 |
commit | e60ae9c9672a52b0f49b4a654a9f3704e9d7244a (patch) | |
tree | 66776cda16f6b85886c66db37d2b4d4757a073ce /test | |
parent | 5e1fbd20619e30046aa6f5eba7a76ea5dd4db16a (diff) |
deflake grpclb_test
Diffstat (limited to 'test')
-rw-r--r-- | test/cpp/grpclb/grpclb_test.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 1430f9de58..b2fdce2963 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -676,11 +676,12 @@ int main(int argc, char **argv) { // If the LB server waits > 2000ms, the update arrives after the first two // request are done and the third pick is performed, which returns, in RR // fashion, the 1st server of the 1st update. Therefore, the second server of - // batch 1 is hit twice, whereas the first server of batch 2 is never hit. - tf_result = grpc::test_update(2100); - GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 2); - GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 1); - GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 1); + // batch 1 is hit at least one, whereas the first server of batch 2 is never + // hit. + tf_result = grpc::test_update(2500); + GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced >= 1); + GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced > 0); + GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced > 0); GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 0); grpc_shutdown(); |