aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/retry
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/retry
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/retry')
-rw-r--r--library/cpp/retry/retry.h2
-rw-r--r--library/cpp/retry/retry_ut.cpp18
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/retry/retry.h b/library/cpp/retry/retry.h
index c47ff5070f..63a2b38967 100644
--- a/library/cpp/retry/retry.h
+++ b/library/cpp/retry/retry.h
@@ -128,6 +128,6 @@ void DoWithRetry(std::function<void()> func, TRetryOptions retryOptions);
bool DoWithRetryOnRetCode(std::function<bool()> func, TRetryOptions retryOptions);
-Y_DECLARE_PODTYPE(TRetryOptions);
+Y_DECLARE_PODTYPE(TRetryOptions);
TRetryOptions MakeRetryOptions(const NRetry::TRetryOptionsPB& retryOptions);
diff --git a/library/cpp/retry/retry_ut.cpp b/library/cpp/retry/retry_ut.cpp
index 92153e987e..c9cbb72a50 100644
--- a/library/cpp/retry/retry_ut.cpp
+++ b/library/cpp/retry/retry_ut.cpp
@@ -27,8 +27,8 @@ namespace {
};
}
-Y_UNIT_TEST_SUITE(Retry) {
- Y_UNIT_TEST(RetryOnExceptionSuccess) {
+Y_UNIT_TEST_SUITE(Retry) {
+ Y_UNIT_TEST(RetryOnExceptionSuccess) {
UNIT_ASSERT_NO_EXCEPTION(DoWithRetry(TDoOnSecondOrThrow{}, TRetryOptions(1, TDuration::Zero())));
}
Y_UNIT_TEST(RetryOnExceptionSuccessWithOnFail) {
@@ -37,7 +37,7 @@ Y_UNIT_TEST_SUITE(Retry) {
UNIT_ASSERT_NO_EXCEPTION(DoWithRetry<ui32>(TDoOnSecondOrThrow{}, cb, TRetryOptions(1, TDuration::Zero()), true));
UNIT_ASSERT_EQUAL(value, 1);
}
- Y_UNIT_TEST(RetryOnExceptionFail) {
+ Y_UNIT_TEST(RetryOnExceptionFail) {
UNIT_ASSERT_EXCEPTION(DoWithRetry(TDoOnSecondOrThrow{}, TRetryOptions(0, TDuration::Zero())), yexception);
}
Y_UNIT_TEST(RetryOnExceptionFailWithOnFail) {
@@ -47,7 +47,7 @@ Y_UNIT_TEST_SUITE(Retry) {
UNIT_ASSERT_EQUAL(value, 1);
}
- Y_UNIT_TEST(RetryOnExceptionSuccessWithValue) {
+ Y_UNIT_TEST(RetryOnExceptionSuccessWithValue) {
std::function<ui32()> f = TDoOnSecondOrThrow{};
UNIT_ASSERT(42 == *DoWithRetry<ui32>(f, TRetryOptions(1, TDuration::Zero()), false));
}
@@ -58,7 +58,7 @@ Y_UNIT_TEST_SUITE(Retry) {
UNIT_ASSERT(42 == *DoWithRetry<ui32>(f, cb, TRetryOptions(1, TDuration::Zero()), false));
UNIT_ASSERT_EQUAL(value, 1);
}
- Y_UNIT_TEST(RetryOnExceptionFailWithValue) {
+ Y_UNIT_TEST(RetryOnExceptionFailWithValue) {
std::function<ui32()> f = TDoOnSecondOrThrow{};
UNIT_ASSERT(!DoWithRetry<ui32>(f, TRetryOptions(0, TDuration::Zero()), false).Defined());
}
@@ -70,7 +70,7 @@ Y_UNIT_TEST_SUITE(Retry) {
UNIT_ASSERT_EQUAL(value, 1);
}
- Y_UNIT_TEST(RetryOnExceptionSuccessWithValueAndRethrow) {
+ Y_UNIT_TEST(RetryOnExceptionSuccessWithValueAndRethrow) {
std::function<ui32()> f = TDoOnSecondOrThrow{};
UNIT_ASSERT(42 == *DoWithRetry<ui32>(f, TRetryOptions(1, TDuration::Zero()), true));
}
@@ -81,7 +81,7 @@ Y_UNIT_TEST_SUITE(Retry) {
UNIT_ASSERT(42 == *DoWithRetry<ui32>(f, cb, TRetryOptions(1, TDuration::Zero()), true));
UNIT_ASSERT_EQUAL(value, 1);
}
- Y_UNIT_TEST(RetryOnExceptionFailWithValueAndRethrow) {
+ Y_UNIT_TEST(RetryOnExceptionFailWithValueAndRethrow) {
std::function<ui32()> f = TDoOnSecondOrThrow{};
UNIT_ASSERT_EXCEPTION(DoWithRetry<ui32>(f, TRetryOptions(0, TDuration::Zero()), true), yexception);
}
@@ -93,10 +93,10 @@ Y_UNIT_TEST_SUITE(Retry) {
UNIT_ASSERT_EQUAL(value, 1);
}
- Y_UNIT_TEST(RetryOnRetCodeSuccess) {
+ Y_UNIT_TEST(RetryOnRetCodeSuccess) {
UNIT_ASSERT(true == DoWithRetryOnRetCode(TDoOnSecondOrFail{}, TRetryOptions(1, TDuration::Zero())));
}
- Y_UNIT_TEST(RetryOnRetCodeFail) {
+ Y_UNIT_TEST(RetryOnRetCodeFail) {
UNIT_ASSERT(false == DoWithRetryOnRetCode(TDoOnSecondOrFail{}, TRetryOptions(0, TDuration::Zero())));
}
Y_UNIT_TEST(MakeRetryOptionsFromProto) {