diff options
author | Alexander Gololobov <davenger@yandex-team.com> | 2022-02-10 16:47:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:38 +0300 |
commit | fccc62e9bfdce9be2fe7e0f23479da3a5512211a (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/messagebus/test/ut/one_way_ut.cpp | |
parent | 39608cdb86363c75ce55b2b9a69841c3b71f22cf (diff) | |
download | ydb-fccc62e9bfdce9be2fe7e0f23479da3a5512211a.tar.gz |
Restoring authorship annotation for Alexander Gololobov <davenger@yandex-team.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/test/ut/one_way_ut.cpp')
-rw-r--r-- | library/cpp/messagebus/test/ut/one_way_ut.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/messagebus/test/ut/one_way_ut.cpp b/library/cpp/messagebus/test/ut/one_way_ut.cpp index bc78c5238a..9c21227e2b 100644 --- a/library/cpp/messagebus/test/ut/one_way_ut.cpp +++ b/library/cpp/messagebus/test/ut/one_way_ut.cpp @@ -93,7 +93,7 @@ public: TExampleProtocol Proto; public: - TAtomic NumMessages; + TAtomic NumMessages; NullServer() { NumMessages = 0; @@ -119,7 +119,7 @@ public: /// tell session to forget this message and never expect any reply mess.ForgetRequest(); - AtomicIncrement(NumMessages); + AtomicIncrement(NumMessages); } /// this handler should not be called because this server does not send replies @@ -139,10 +139,10 @@ Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) { client.Work(); // wait until all client message are delivered - UNIT_WAIT_FOR(AtomicGet(server.NumMessages) == 10); + UNIT_WAIT_FOR(AtomicGet(server.NumMessages) == 10); // assert correct number of messages - UNIT_ASSERT_VALUES_EQUAL(AtomicGet(server.NumMessages), 10); + UNIT_ASSERT_VALUES_EQUAL(AtomicGet(server.NumMessages), 10); UNIT_ASSERT_VALUES_EQUAL(server.Session->GetInFlight(), 0); UNIT_ASSERT_VALUES_EQUAL(client.Session->GetInFlight(), 0); } @@ -196,7 +196,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) { TBusClientSessionConfig sessionConfig; sessionConfig.SendTimeout = 1; sessionConfig.ConnectTimeout = 1; - sessionConfig.Secret.TimeoutPeriod = TDuration::MilliSeconds(10); + sessionConfig.Secret.TimeoutPeriod = TDuration::MilliSeconds(10); return sessionConfig; } @@ -245,11 +245,11 @@ Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) { first = false; } - // BUGBUG: The test is buggy: the client might not get any error when sending one-way messages. - // All the messages that the client has sent before he gets first MESSAGE_BUSY error might get - // serailized and written to the socket buffer, so the write queue gets drained and there are - // no messages to timeout when periodic timeout check happens. - + // BUGBUG: The test is buggy: the client might not get any error when sending one-way messages. + // All the messages that the client has sent before he gets first MESSAGE_BUSY error might get + // serailized and written to the socket buffer, so the write queue gets drained and there are + // no messages to timeout when periodic timeout check happens. + client.GotError.WaitI(); } } |