summaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/rain_check
diff options
context:
space:
mode:
authorilnurkh <[email protected]>2023-10-09 23:39:40 +0300
committerilnurkh <[email protected]>2023-10-09 23:57:14 +0300
commite601ca03f859335d57ecff2e5aa6af234b6052ed (patch)
treede519a847e58a1b3993fcbfe05ff44cc946a3e24 /library/cpp/messagebus/rain_check
parentbbf2b6878af3854815a2c0ecb07a687071787639 (diff)
Y_VERIFY->Y_ABORT_UNLESS at ^l
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/messagebus/rain_check')
-rw-r--r--library/cpp/messagebus/rain_check/core/coro_stack.cpp4
-rw-r--r--library/cpp/messagebus/rain_check/core/simple_ut.cpp2
-rw-r--r--library/cpp/messagebus/rain_check/core/task.cpp2
-rw-r--r--library/cpp/messagebus/rain_check/http/client.cpp10
-rw-r--r--library/cpp/messagebus/rain_check/messagebus/messagebus_client_ut.cpp6
-rw-r--r--library/cpp/messagebus/rain_check/test/helper/misc.cpp4
6 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/messagebus/rain_check/core/coro_stack.cpp b/library/cpp/messagebus/rain_check/core/coro_stack.cpp
index 83b984ca6e9..96ab66865c5 100644
--- a/library/cpp/messagebus/rain_check/core/coro_stack.cpp
+++ b/library/cpp/messagebus/rain_check/core/coro_stack.cpp
@@ -12,8 +12,8 @@ using namespace NRainCheck::NPrivate;
TCoroStack::TCoroStack(size_t size)
: SizeValue(size)
{
- Y_VERIFY(size % sizeof(ui32) == 0);
- Y_VERIFY(size >= 0x1000);
+ Y_ABORT_UNLESS(size % sizeof(ui32) == 0);
+ Y_ABORT_UNLESS(size >= 0x1000);
DataHolder.Reset(malloc(size));
diff --git a/library/cpp/messagebus/rain_check/core/simple_ut.cpp b/library/cpp/messagebus/rain_check/core/simple_ut.cpp
index d4545e05aa1..d0afaf19faa 100644
--- a/library/cpp/messagebus/rain_check/core/simple_ut.cpp
+++ b/library/cpp/messagebus/rain_check/core/simple_ut.cpp
@@ -31,7 +31,7 @@ Y_UNIT_TEST_SUITE(RainCheckSimple) {
}
void SleepCompletionCallback(TSubtaskCompletion* completion) {
- Y_VERIFY(completion == &SleepCompletion);
+ Y_ABORT_UNLESS(completion == &SleepCompletion);
TestSync->CheckAndIncrement(1);
Env->SleepService.Sleep(&SleepCompletion, TDuration::MilliSeconds(1));
diff --git a/library/cpp/messagebus/rain_check/core/task.cpp b/library/cpp/messagebus/rain_check/core/task.cpp
index a098437d534..d8aeefac25c 100644
--- a/library/cpp/messagebus/rain_check/core/task.cpp
+++ b/library/cpp/messagebus/rain_check/core/task.cpp
@@ -199,7 +199,7 @@ void TTaskRunnerBase::AssertInThisThread() const {
}
TTaskRunnerBase* TTaskRunnerBase::CurrentTask() {
- Y_VERIFY(!!ThreadCurrentTask);
+ Y_ABORT_UNLESS(!!ThreadCurrentTask);
return ThreadCurrentTask;
}
diff --git a/library/cpp/messagebus/rain_check/http/client.cpp b/library/cpp/messagebus/rain_check/http/client.cpp
index 5ef5ceeece2..7ac5034e910 100644
--- a/library/cpp/messagebus/rain_check/http/client.cpp
+++ b/library/cpp/messagebus/rain_check/http/client.cpp
@@ -19,7 +19,7 @@ namespace NRainCheck {
THttpCallback(NRainCheck::THttpFuture* future)
: Future(future)
{
- Y_VERIFY(!!future, "future is NULL");
+ Y_ABORT_UNLESS(!!future, "future is NULL");
}
void OnRecv(NNeh::THandle& handle) override {
@@ -57,15 +57,15 @@ namespace NRainCheck {
: GetProtocol(NNeh::ProtocolFactory()->Protocol("http"))
, FullProtocol(NNeh::ProtocolFactory()->Protocol("full"))
{
- Y_VERIFY(!!GetProtocol, "GET protocol is NULL.");
- Y_VERIFY(!!FullProtocol, "POST protocol is NULL.");
+ Y_ABORT_UNLESS(!!GetProtocol, "GET protocol is NULL.");
+ Y_ABORT_UNLESS(!!FullProtocol, "POST protocol is NULL.");
}
THttpClientService::~THttpClientService() {
}
void THttpClientService::SendPost(TString addr, const TString& data, const THttpHeaders& headers, THttpFuture* future) {
- Y_VERIFY(!!future, "future is NULL.");
+ Y_ABORT_UNLESS(!!future, "future is NULL.");
TTaskRunnerBase* current = TTaskRunnerBase::CurrentTask();
future->SetRunning(current);
@@ -88,7 +88,7 @@ namespace NRainCheck {
}
void THttpClientService::Send(const TString& request, THttpFuture* future) {
- Y_VERIFY(!!future, "future is NULL.");
+ Y_ABORT_UNLESS(!!future, "future is NULL.");
TTaskRunnerBase* current = TTaskRunnerBase::CurrentTask();
future->SetRunning(current);
diff --git a/library/cpp/messagebus/rain_check/messagebus/messagebus_client_ut.cpp b/library/cpp/messagebus/rain_check/messagebus/messagebus_client_ut.cpp
index 1b3618558b8..35bb7abd8e3 100644
--- a/library/cpp/messagebus/rain_check/messagebus/messagebus_client_ut.cpp
+++ b/library/cpp/messagebus/rain_check/messagebus/messagebus_client_ut.cpp
@@ -58,7 +58,7 @@ Y_UNIT_TEST_SUITE(RainCheckMessageBusClient) {
TContinueFunc GotReplies() {
for (unsigned i = 0; i < Requests.size(); ++i) {
- Y_VERIFY(Requests[i]->GetStatus() == MESSAGE_OK);
+ Y_ABORT_UNLESS(Requests[i]->GetStatus() == MESSAGE_OK);
VerifyDynamicCast<TExampleResponse*>(Requests[i]->GetResponse());
}
Env->TestSync.CheckAndIncrement(0);
@@ -124,8 +124,8 @@ Y_UNIT_TEST_SUITE(RainCheckMessageBusClient) {
TContinueFunc GotReplies() {
for (unsigned i = 0; i < Requests.size(); ++i) {
- Y_VERIFY(Requests[i]->GetStatus() == MESSAGE_OK);
- Y_VERIFY(!Requests[i]->GetResponse());
+ Y_ABORT_UNLESS(Requests[i]->GetStatus() == MESSAGE_OK);
+ Y_ABORT_UNLESS(!Requests[i]->GetResponse());
}
Env->TestSync.WaitForAndIncrement(2);
return nullptr;
diff --git a/library/cpp/messagebus/rain_check/test/helper/misc.cpp b/library/cpp/messagebus/rain_check/test/helper/misc.cpp
index c0fcb272523..d940d68a4b0 100644
--- a/library/cpp/messagebus/rain_check/test/helper/misc.cpp
+++ b/library/cpp/messagebus/rain_check/test/helper/misc.cpp
@@ -5,7 +5,7 @@
using namespace NRainCheck;
void TSpawnNopTasksCoroTask::Run() {
- Y_VERIFY(Count <= Completion.size());
+ Y_ABORT_UNLESS(Count <= Completion.size());
for (unsigned i = 0; i < Count; ++i) {
SpawnSubtask<TNopCoroTask>(Env, &Completion[i], "");
}
@@ -14,7 +14,7 @@ void TSpawnNopTasksCoroTask::Run() {
}
TContinueFunc TSpawnNopTasksSimpleTask::Start() {
- Y_VERIFY(Count <= Completion.size());
+ Y_ABORT_UNLESS(Count <= Completion.size());
for (unsigned i = 0; i < Count; ++i) {
SpawnSubtask<TNopSimpleTask>(Env, &Completion[i], "");
}