proxygen
|
#include <algorithm>
#include <atomic>
#include <vector>
#include <folly/futures/Retrying.h>
#include <folly/futures/test/TestExecutor.h>
#include <folly/portability/GTest.h>
#include <folly/portability/SysResource.h>
Go to the source code of this file.
Functions | |
template<typename D , typename F > | |
void | multiAttemptExpectDurationWithin (size_t num_tries, D min_duration, D max_duration, const F &func) |
TEST (RetryingTest, has_op_call) | |
TEST (RetryingTest, basic) | |
TEST (RetryingTest, future_factory_throws) | |
TEST (RetryingTest, policy_throws) | |
TEST (RetryingTest, policy_future) | |
TEST (RetryingTest, policy_basic) | |
TEST (RetryingTest, policy_capped_jittered_exponential_backoff) | |
TEST (RetryingTest, policy_capped_jittered_exponential_backoff_many_retries) | |
TEST (RetryingTest, policy_sleep_defaults) | |
TEST (RetryingTest, large_retries) | |
void multiAttemptExpectDurationWithin | ( | size_t | num_tries, |
D | min_duration, | ||
D | max_duration, | ||
const F & | func | ||
) |
TEST | ( | RetryingTest | , |
has_op_call | |||
) |
Definition at line 58 of file RetryingTest.cpp.
References EXPECT_TRUE, folly::makeFuture(), and value.
TEST | ( | RetryingTest | , |
basic | |||
) |
Definition at line 67 of file RetryingTest.cpp.
References EXPECT_EQ, folly::makeFuture(), folly::futures::retrying(), and folly::detail::distributed_mutex::wait().
TEST | ( | RetryingTest | , |
future_factory_throws | |||
) |
Definition at line 78 of file RetryingTest.cpp.
References EXPECT_THROW, folly::makeFuture(), folly::futures::retrying(), and folly::detail::distributed_mutex::wait().
TEST | ( | RetryingTest | , |
policy_throws | |||
) |
Definition at line 99 of file RetryingTest.cpp.
References eggs, EXPECT_THROW, folly::gen::move, and folly::futures::retrying().
TEST | ( | RetryingTest | , |
policy_future | |||
) |
Definition at line 107 of file RetryingTest.cpp.
References EXPECT_EQ, folly::makeFuture(), folly::futures::retrying(), and folly::detail::distributed_mutex::wait().
TEST | ( | RetryingTest | , |
policy_basic | |||
) |
Definition at line 125 of file RetryingTest.cpp.
References EXPECT_EQ, folly::makeFuture(), folly::futures::retrying(), folly::futures::retryingPolicyBasic(), and folly::detail::distributed_mutex::wait().
TEST | ( | RetryingTest | , |
policy_capped_jittered_exponential_backoff | |||
) |
Definition at line 136 of file RetryingTest.cpp.
References EXPECT_EQ, folly::makeFuture(), multiAttemptExpectDurationWithin(), folly::futures::retrying(), folly::futures::detail::retryingPolicyCappedJitteredExponentialBackoff(), and folly::detail::distributed_mutex::wait().
TEST | ( | RetryingTest | , |
policy_capped_jittered_exponential_backoff_many_retries | |||
) |
Definition at line 156 of file RetryingTest.cpp.
References EXPECT_EQ, EXPECT_LT, max, folly::futures::detail::retryingJitteredExponentialBackoffDur(), and rng.
TEST | ( | RetryingTest | , |
policy_sleep_defaults | |||
) |
Definition at line 177 of file RetryingTest.cpp.
References EXPECT_EQ, folly::makeFuture(), multiAttemptExpectDurationWithin(), folly::futures::retrying(), folly::futures::detail::retryingPolicyCappedJitteredExponentialBackoff(), and folly::detail::distributed_mutex::wait().
TEST | ( | RetryingTest | , |
large_retries | |||
) |
Definition at line 193 of file RetryingTest.cpp.
References folly::pushmi::executor, EXPECT_TRUE, f, folly::kIsSanitizeAddress, min, folly::futures::retrying(), SCOPE_EXIT, and folly::pushmi::operators::via.