diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/messagebus/test/helper | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/test/helper')
-rw-r--r-- | library/cpp/messagebus/test/helper/alloc_counter.h | 2 | ||||
-rw-r--r-- | library/cpp/messagebus/test/helper/example.cpp | 22 | ||||
-rw-r--r-- | library/cpp/messagebus/test/helper/message_handler_error.cpp | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/messagebus/test/helper/alloc_counter.h b/library/cpp/messagebus/test/helper/alloc_counter.h index 0f7631166b..ec9041cb15 100644 --- a/library/cpp/messagebus/test/helper/alloc_counter.h +++ b/library/cpp/messagebus/test/helper/alloc_counter.h @@ -16,6 +16,6 @@ public: } ~TAllocCounter() { - Y_VERIFY(AtomicDecrement(*CountPtr) >= 0, "released too many"); + Y_VERIFY(AtomicDecrement(*CountPtr) >= 0, "released too many"); } }; diff --git a/library/cpp/messagebus/test/helper/example.cpp b/library/cpp/messagebus/test/helper/example.cpp index 07b8e47c74..7c6d704042 100644 --- a/library/cpp/messagebus/test/helper/example.cpp +++ b/library/cpp/messagebus/test/helper/example.cpp @@ -68,11 +68,11 @@ TExampleProtocol::~TExampleProtocol() { // so it could be reported in test return; } - Y_VERIFY(0 == AtomicGet(RequestCount), "protocol %s: must be 0 requests allocated, actually %d", GetService(), int(RequestCount)); - Y_VERIFY(0 == AtomicGet(ResponseCount), "protocol %s: must be 0 responses allocated, actually %d", GetService(), int(ResponseCount)); - Y_VERIFY(0 == AtomicGet(RequestCountDeserialized), "protocol %s: must be 0 requests deserialized allocated, actually %d", GetService(), int(RequestCountDeserialized)); - Y_VERIFY(0 == AtomicGet(ResponseCountDeserialized), "protocol %s: must be 0 responses deserialized allocated, actually %d", GetService(), int(ResponseCountDeserialized)); - Y_VERIFY(0 == AtomicGet(StartCount), "protocol %s: must be 0 start objects allocated, actually %d", GetService(), int(StartCount)); + Y_VERIFY(0 == AtomicGet(RequestCount), "protocol %s: must be 0 requests allocated, actually %d", GetService(), int(RequestCount)); + Y_VERIFY(0 == AtomicGet(ResponseCount), "protocol %s: must be 0 responses allocated, actually %d", GetService(), int(ResponseCount)); + Y_VERIFY(0 == AtomicGet(RequestCountDeserialized), "protocol %s: must be 0 requests deserialized allocated, actually %d", GetService(), int(RequestCountDeserialized)); + Y_VERIFY(0 == AtomicGet(ResponseCountDeserialized), "protocol %s: must be 0 responses deserialized allocated, actually %d", GetService(), int(ResponseCountDeserialized)); + Y_VERIFY(0 == AtomicGet(StartCount), "protocol %s: must be 0 start objects allocated, actually %d", GetService(), int(StartCount)); } void TExampleProtocol::Serialize(const TBusMessage* message, TBuffer& buffer) { @@ -83,13 +83,13 @@ void TExampleProtocol::Serialize(const TBusMessage* message, TBuffer& buffer) { } else if (const TExampleResponse* exampleReply = dynamic_cast<const TExampleResponse*>(message)) { buffer.Append(exampleReply->Data.data(), exampleReply->Data.size()); } else { - Y_FAIL("unknown message type"); + Y_FAIL("unknown message type"); } } TAutoPtr<TBusMessage> TExampleProtocol::Deserialize(ui16 messageType, TArrayRef<const char> payload) { // TODO: check data - Y_UNUSED(payload); + Y_UNUSED(payload); if (messageType == 77) { TExampleRequest* exampleMessage = new TExampleRequest(MESSAGE_CREATE_UNINITIALIZED, &RequestCountDeserialized); @@ -194,8 +194,8 @@ void TExampleClient::SendMessagesWaitReplies(size_t count, const TNetAddr& addr) } void TExampleClient::OnReply(TAutoPtr<TBusMessage> mess, TAutoPtr<TBusMessage> reply) { - Y_UNUSED(mess); - Y_UNUSED(reply); + Y_UNUSED(mess); + Y_UNUSED(reply); if (AtomicIncrement(RepliesCount) == MessageCount) { WorkDone.Signal(); @@ -204,10 +204,10 @@ void TExampleClient::OnReply(TAutoPtr<TBusMessage> mess, TAutoPtr<TBusMessage> r void TExampleClient::OnError(TAutoPtr<TBusMessage> mess, EMessageStatus status) { if (CrashOnError) { - Y_FAIL("client failed: %s", ToCString(status)); + Y_FAIL("client failed: %s", ToCString(status)); } - Y_UNUSED(mess); + Y_UNUSED(mess); AtomicIncrement(Errors); LastError = status; diff --git a/library/cpp/messagebus/test/helper/message_handler_error.cpp b/library/cpp/messagebus/test/helper/message_handler_error.cpp index 421e0ce397..c09811ec67 100644 --- a/library/cpp/messagebus/test/helper/message_handler_error.cpp +++ b/library/cpp/messagebus/test/helper/message_handler_error.cpp @@ -10,11 +10,11 @@ void TBusClientHandlerError::OnError(TAutoPtr<TBusMessage>, EMessageStatus statu } void TBusClientHandlerError::OnReply(TAutoPtr<TBusMessage>, TAutoPtr<TBusMessage>) { - Y_FAIL("must not be called"); + Y_FAIL("must not be called"); } void TBusClientHandlerError::OnMessageSentOneWay(TAutoPtr<TBusMessage>) { - Y_FAIL("must not be called"); + Y_FAIL("must not be called"); } void TBusServerHandlerError::OnError(TAutoPtr<TBusMessage>, EMessageStatus status) { @@ -22,5 +22,5 @@ void TBusServerHandlerError::OnError(TAutoPtr<TBusMessage>, EMessageStatus statu } void TBusServerHandlerError::OnMessage(TOnMessageContext&) { - Y_FAIL("must not be called"); + Y_FAIL("must not be called"); } |