|
|
|
@ -362,7 +362,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstBackOffInitialReconnect) { |
|
|
|
|
grpc_timeout_milliseconds_to_deadline(kInitialBackOffMs * 2))); |
|
|
|
|
const gpr_timespec t1 = gpr_now(GPR_CLOCK_MONOTONIC); |
|
|
|
|
const grpc_millis waited_ms = gpr_time_to_millis(gpr_time_sub(t1, t0)); |
|
|
|
|
gpr_log(GPR_DEBUG, "Waited %ld milliseconds", waited_ms); |
|
|
|
|
gpr_log(GPR_DEBUG, "Waited %" PRId64 " milliseconds", waited_ms); |
|
|
|
|
// We should have waited at least kInitialBackOffMs. We substract one to
|
|
|
|
|
// account for test and precision accuracy drift.
|
|
|
|
|
EXPECT_GE(waited_ms, kInitialBackOffMs - 1); |
|
|
|
@ -391,7 +391,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstBackOffMinReconnect) { |
|
|
|
|
grpc_timeout_milliseconds_to_deadline(kMinReconnectBackOffMs * 2)); |
|
|
|
|
const gpr_timespec t1 = gpr_now(GPR_CLOCK_MONOTONIC); |
|
|
|
|
const grpc_millis waited_ms = gpr_time_to_millis(gpr_time_sub(t1, t0)); |
|
|
|
|
gpr_log(GPR_DEBUG, "Waited %ld ms", waited_ms); |
|
|
|
|
gpr_log(GPR_DEBUG, "Waited %" PRId64 " ms", waited_ms); |
|
|
|
|
// We should have waited at least kMinReconnectBackOffMs. We substract one to
|
|
|
|
|
// account for test and precision accuracy drift.
|
|
|
|
|
EXPECT_GE(waited_ms, kMinReconnectBackOffMs - 1); |
|
|
|
|