diff options
author | 2017-08-14 07:05:24 -0700 | |
---|---|---|
committer | 2017-08-14 07:05:24 -0700 | |
commit | d1ba31d134235aecd42a075cf0ec87d2e255a12f (patch) | |
tree | c8e42a60ffd246d48aa41ec7a9aff5e8391060d3 /test/core | |
parent | 5140b5328e4be901d714fed75a5242a2c4fefb98 (diff) | |
parent | 41ba268c201bc8c861f1ce929ced0f54c3301b10 (diff) |
Merge pull request #11831 from ncteisen/flow-control-part2
Flow Control Part 2: BDP
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/transport/bdp_estimator_test.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/core/transport/bdp_estimator_test.c b/test/core/transport/bdp_estimator_test.c index e2612c7718..dda48f45b1 100644 --- a/test/core/transport/bdp_estimator_test.c +++ b/test/core/transport/bdp_estimator_test.c @@ -43,12 +43,13 @@ static void test_get_estimate_no_samples(void) { static void add_samples(grpc_bdp_estimator *estimator, int64_t *samples, size_t n) { - GPR_ASSERT(grpc_bdp_estimator_add_incoming_bytes(estimator, 1234567) == true); + grpc_bdp_estimator_add_incoming_bytes(estimator, 1234567); + GPR_ASSERT(grpc_bdp_estimator_need_ping(estimator) == true); grpc_bdp_estimator_schedule_ping(estimator); grpc_bdp_estimator_start_ping(estimator); for (size_t i = 0; i < n; i++) { - GPR_ASSERT(grpc_bdp_estimator_add_incoming_bytes(estimator, samples[i]) == - false); + grpc_bdp_estimator_add_incoming_bytes(estimator, samples[i]); + GPR_ASSERT(grpc_bdp_estimator_need_ping(estimator) == false); } gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(1, GPR_TIMESPAN))); |