Commit a2cc202c authored by zhujiashun's avatar zhujiashun

health_check_using_rpc: fix UT

parent a236b5d1
...@@ -545,7 +545,7 @@ public: ...@@ -545,7 +545,7 @@ public:
brpc::ClosureGuard done_guard(done); brpc::ClosureGuard done_guard(done);
brpc::Controller* cntl = (brpc::Controller*)cntl_base; brpc::Controller* cntl = (brpc::Controller*)cntl_base;
if (_sleep_flag) { if (_sleep_flag) {
bthread_usleep(310000 /* 310ms, a little bit longer than the default bthread_usleep(510000 /* 510ms, a little bit longer than the default
timeout of health checking rpc */); timeout of health checking rpc */);
} }
cntl->response_attachment().append("OK"); cntl->response_attachment().append("OK");
...@@ -589,7 +589,7 @@ TEST_F(SocketTest, health_check_using_rpc) { ...@@ -589,7 +589,7 @@ TEST_F(SocketTest, health_check_using_rpc) {
hc_service._sleep_flag = false; hc_service._sleep_flag = false;
// sleep so long because of the buggy impl of health check with no circuit breaker // sleep so long because of the buggy impl of health check with no circuit breaker
// enabled but the sleep time is still exponentially backoff. // enabled but the sleep time is still exponentially backoff.
bthread_usleep(2500000); bthread_usleep(3000000);
// should recover now // should recover now
{ {
brpc::Controller cntl; brpc::Controller cntl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment