diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/messagebus/test/ut/module_client_ut.cpp | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 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 | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/library/cpp/messagebus/test/ut/module_client_ut.cpp b/library/cpp/messagebus/test/ut/module_client_ut.cpp index 84897ce5c4..ebfe185cc6 100644 --- a/library/cpp/messagebus/test/ut/module_client_ut.cpp +++ b/library/cpp/messagebus/test/ut/module_client_ut.cpp @@ -20,34 +20,34 @@ using namespace NBus::NTest; // helper class that cleans TBusJob instance, so job's destructor can // be completed without assertion fail. struct TJobGuard { -public: - TJobGuard(NBus::TBusJob* job) - : Job(job) - { - } - - ~TJobGuard() { - Job->ClearAllMessageStates(); - } - -private: - NBus::TBusJob* Job; +public: + TJobGuard(NBus::TBusJob* job) + : Job(job) + { + } + + ~TJobGuard() { + Job->ClearAllMessageStates(); + } + +private: + NBus::TBusJob* Job; }; -class TMessageOk: public NBus::TBusMessage { -public: - TMessageOk() - : NBus::TBusMessage(1) - { - } +class TMessageOk: public NBus::TBusMessage { +public: + TMessageOk() + : NBus::TBusMessage(1) + { + } }; -class TMessageError: public NBus::TBusMessage { -public: - TMessageError() - : NBus::TBusMessage(2) - { - } +class TMessageError: public NBus::TBusMessage { +public: + TMessageError() + : NBus::TBusMessage(2) + { + } }; Y_UNIT_TEST_SUITE(BusJobTest) { @@ -108,8 +108,8 @@ Y_UNIT_TEST_SUITE(BusJobTest) { TParallelOnReplyModule(const TNetAddr& serverAddr) : ServerAddr(serverAddr) , RepliesLatch(2) - { - } + { + } TJobHandler Start(TBusJob* job, TBusMessage* mess) override { Y_UNUSED(mess); @@ -166,8 +166,8 @@ Y_UNIT_TEST_SUITE(BusJobTest) { : ServerAddr("localhost", 17) , GotReplyLatch(2) , SentMessage() - { - } + { + } TJobHandler Start(TBusJob* job, TBusMessage* mess) override { Y_UNUSED(mess); @@ -222,7 +222,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { module.Shutdown(); } - struct TSlowReplyServer: public TBusServerHandlerError { + struct TSlowReplyServer: public TBusServerHandlerError { TTestSync* const TestSync; TBusMessageQueuePtr Bus; TBusServerSessionPtr ServerSession; @@ -248,7 +248,7 @@ Y_UNIT_TEST_SUITE(BusJobTest) { } }; - struct TModuleThatSendsReplyEarly: public TExampleClientModule { + struct TModuleThatSendsReplyEarly: public TExampleClientModule { TTestSync* const TestSync; const unsigned ServerPort; @@ -260,8 +260,8 @@ Y_UNIT_TEST_SUITE(BusJobTest) { , ServerPort(serverPort) , ServerSession(nullptr) , ReplyCount(0) - { - } + { + } TJobHandler Start(TBusJob* job, TBusMessage* mess) override { Y_UNUSED(mess); @@ -318,22 +318,22 @@ Y_UNIT_TEST_SUITE(BusJobTest) { module.Shutdown(); } - struct TShutdownCalledBeforeReplyReceivedModule: public TExampleClientModule { + struct TShutdownCalledBeforeReplyReceivedModule: public TExampleClientModule { unsigned ServerPort; TTestSync TestSync; TShutdownCalledBeforeReplyReceivedModule(unsigned serverPort) : ServerPort(serverPort) - { - } + { + } TJobHandler Start(TBusJob* job, TBusMessage*) override { TestSync.CheckAndIncrement(0); job->Send(new TExampleRequest(&Proto.RequestCount), Source, - TReplyHandler(&TShutdownCalledBeforeReplyReceivedModule::HandleReply), - 0, TNetAddr("localhost", ServerPort)); + TReplyHandler(&TShutdownCalledBeforeReplyReceivedModule::HandleReply), + 0, TNetAddr("localhost", ServerPort)); return &TShutdownCalledBeforeReplyReceivedModule::End; } |