diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/messagebus/test/ut/module_client_ut.cpp | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/test/ut/module_client_ut.cpp')
-rw-r--r-- | library/cpp/messagebus/test/ut/module_client_ut.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/messagebus/test/ut/module_client_ut.cpp b/library/cpp/messagebus/test/ut/module_client_ut.cpp index ebfe185cc6..16d2f22335 100644 --- a/library/cpp/messagebus/test/ut/module_client_ut.cpp +++ b/library/cpp/messagebus/test/ut/module_client_ut.cpp @@ -50,9 +50,9 @@ public: } }; -Y_UNIT_TEST_SUITE(BusJobTest) { +Y_UNIT_TEST_SUITE(BusJobTest) { #if 0 - Y_UNIT_TEST(TestPending) { + Y_UNIT_TEST(TestPending) { TObjectCountCheck objectCountCheck; TDupDetectModule module; @@ -69,7 +69,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { UNIT_ASSERT_EQUAL(msg, pending[0].Message); } - Y_UNIT_TEST(TestCallReplyHandler) { + Y_UNIT_TEST(TestCallReplyHandler) { TObjectCountCheck objectCountCheck; TDupDetectModule module; @@ -112,27 +112,27 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } TJobHandler Start(TBusJob* job, TBusMessage* mess) override { - Y_UNUSED(mess); + Y_UNUSED(mess); job->Send(new TExampleRequest(&Proto.RequestCount), Source, TReplyHandler(&TParallelOnReplyModule::ReplyHandler), 0, ServerAddr); return &TParallelOnReplyModule::HandleReplies; } void ReplyHandler(TBusJob*, EMessageStatus status, TBusMessage* mess, TBusMessage* reply) { - Y_UNUSED(mess); - Y_UNUSED(reply); - Y_VERIFY(status == MESSAGE_OK, "failed to get reply: %s", ToCString(status)); + Y_UNUSED(mess); + Y_UNUSED(reply); + Y_VERIFY(status == MESSAGE_OK, "failed to get reply: %s", ToCString(status)); } TJobHandler HandleReplies(TBusJob* job, TBusMessage* mess) { - Y_UNUSED(mess); + Y_UNUSED(mess); RepliesLatch.CountDown(); - Y_VERIFY(RepliesLatch.Await(TDuration::Seconds(10)), "failed to get answers"); + Y_VERIFY(RepliesLatch.Await(TDuration::Seconds(10)), "failed to get answers"); job->Cancel(MESSAGE_UNKNOWN); return nullptr; } }; - Y_UNIT_TEST(TestReplyHandlerCalledInParallel) { + Y_UNIT_TEST(TestReplyHandlerCalledInParallel) { TObjectCountCheck objectCountCheck; TExampleServer server; @@ -170,7 +170,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } TJobHandler Start(TBusJob* job, TBusMessage* mess) override { - Y_UNUSED(mess); + Y_UNUSED(mess); TExampleRequest* message = new TExampleRequest(&Proto.RequestCount); job->Send(message, Source, TReplyHandler(&TErrorHandlerCheckerModule::ReplyHandler), 0, ServerAddr); SentMessage = message; @@ -179,13 +179,13 @@ Y_UNIT_TEST_SUITE(BusJobTest) { void ReplyHandler(TBusJob*, EMessageStatus status, TBusMessage* req, TBusMessage* resp) { Y_VERIFY(status == MESSAGE_CONNECT_FAILED || status == MESSAGE_TIMEOUT, "got wrong status: %s", ToString(status).data()); - Y_VERIFY(req == SentMessage, "checking request"); - Y_VERIFY(resp == nullptr, "checking response"); + Y_VERIFY(req == SentMessage, "checking request"); + Y_VERIFY(resp == nullptr, "checking response"); GotReplyLatch.CountDown(); } TJobHandler HandleReplies(TBusJob* job, TBusMessage* mess) { - Y_UNUSED(mess); + Y_UNUSED(mess); job->Cancel(MESSAGE_UNKNOWN); GotReplyLatch.CountDown(); return nullptr; @@ -201,7 +201,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } }; - Y_UNIT_TEST(ErrorHandler) { + Y_UNIT_TEST(ErrorHandler) { TExampleProtocol proto; TBusQueueConfig config; @@ -264,7 +264,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } TJobHandler Start(TBusJob* job, TBusMessage* mess) override { - Y_UNUSED(mess); + Y_UNUSED(mess); for (unsigned i = 0; i < 2; ++i) { job->Send( new TExampleRequest(&Proto.RequestCount), @@ -277,9 +277,9 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } void ReplyHandler(TBusJob* job, EMessageStatus status, TBusMessage* mess, TBusMessage* reply) { - Y_UNUSED(mess); - Y_UNUSED(reply); - Y_VERIFY(status == MESSAGE_OK, "failed to get reply"); + Y_UNUSED(mess); + Y_UNUSED(reply); + Y_VERIFY(status == MESSAGE_OK, "failed to get reply"); if (AtomicIncrement(ReplyCount) == 1) { TestSync->WaitForAndIncrement(1); job->SendReply(new TExampleResponse(&Proto.ResponseCount)); @@ -289,7 +289,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } TJobHandler HandleReplies(TBusJob* job, TBusMessage* mess) { - Y_UNUSED(mess); + Y_UNUSED(mess); job->Cancel(MESSAGE_UNKNOWN); return nullptr; } @@ -301,7 +301,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } }; - Y_UNIT_TEST(SendReplyCalledBeforeAllRepliesReceived) { + Y_UNIT_TEST(SendReplyCalledBeforeAllRepliesReceived) { TTestSync testSync; TSlowReplyServer slowReplyServer(&testSync); @@ -338,7 +338,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } void HandleReply(TBusJob*, EMessageStatus status, TBusMessage*, TBusMessage*) { - Y_VERIFY(status == MESSAGE_SHUTDOWN, "got %s", ToCString(status)); + Y_VERIFY(status == MESSAGE_SHUTDOWN, "got %s", ToCString(status)); TestSync.CheckAndIncrement(1); } @@ -349,7 +349,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } }; - Y_UNIT_TEST(ShutdownCalledBeforeReplyReceived) { + Y_UNIT_TEST(ShutdownCalledBeforeReplyReceived) { TExampleServer server; server.ForgetRequest = true; |