21 #include <gtest/gtest.h>
29 TEST(ServerRetryThrottleData, Basic) {
34 MakeRefCounted<ServerRetryThrottleData>(4000, 1600,
nullptr);
38 throttle_data->RecordSuccess();
51 throttle_data->RecordSuccess();
53 throttle_data->RecordSuccess();
59 throttle_data->RecordSuccess();
63 throttle_data->RecordSuccess();
68 TEST(ServerRetryThrottleData, Replacement) {
73 auto old_throttle_data =
74 MakeRefCounted<ServerRetryThrottleData>(4000, 1000,
nullptr);
81 auto throttle_data = MakeRefCounted<ServerRetryThrottleData>(
82 10000, 3000, old_throttle_data.get());
92 throttle_data->RecordSuccess();
99 TEST(ServerRetryThrottleMap, Replacement) {
105 auto old_throttle_data =
124 throttle_data->RecordSuccess();
135 int main(
int argc,
char** argv) {