diff options
author | dronimal <dronimal@yandex-team.ru> | 2022-02-10 16:47:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:14 +0300 |
commit | 2f2cfabf97857f24c4af02eed4ed9b5a14655bac (patch) | |
tree | d1555d5568cdcab2fecc314cc22de71b9850d33a /library/cpp/threading/future/future_ut.cpp | |
parent | 55160ef791e40ea123fd56456eeeaf648ef93fc0 (diff) | |
download | ydb-2f2cfabf97857f24c4af02eed4ed9b5a14655bac.tar.gz |
Restoring authorship annotation for <dronimal@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/threading/future/future_ut.cpp')
-rw-r--r-- | library/cpp/threading/future/future_ut.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/threading/future/future_ut.cpp b/library/cpp/threading/future/future_ut.cpp index 05950a568d..68a6779098 100644 --- a/library/cpp/threading/future/future_ut.cpp +++ b/library/cpp/threading/future/future_ut.cpp @@ -239,27 +239,27 @@ namespace { UNIT_ASSERT_EXCEPTION(promise.TryRethrow(), TCustomException); } - Y_UNIT_TEST(ShouldRethrowCallbackException) { - TPromise<int> promise = NewPromise<int>(); - TFuture<int> future = promise.GetFuture(); - future.Subscribe([](const TFuture<int>&) { - throw TCustomException(); - }); - - UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException); - } - - Y_UNIT_TEST(ShouldRethrowCallbackExceptionIgnoreResult) { - TPromise<int> promise = NewPromise<int>(); - TFuture<void> future = promise.GetFuture().IgnoreResult(); - future.Subscribe([](const TFuture<void>&) { - throw TCustomException(); - }); - - UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException); - } - - + Y_UNIT_TEST(ShouldRethrowCallbackException) { + TPromise<int> promise = NewPromise<int>(); + TFuture<int> future = promise.GetFuture(); + future.Subscribe([](const TFuture<int>&) { + throw TCustomException(); + }); + + UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException); + } + + Y_UNIT_TEST(ShouldRethrowCallbackExceptionIgnoreResult) { + TPromise<int> promise = NewPromise<int>(); + TFuture<void> future = promise.GetFuture().IgnoreResult(); + future.Subscribe([](const TFuture<void>&) { + throw TCustomException(); + }); + + UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException); + } + + Y_UNIT_TEST(ShouldWaitExceptionOrAll) { TPromise<void> promise1 = NewPromise(); TPromise<void> promise2 = NewPromise(); |