aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/test/ut
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/messagebus/test/ut
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/test/ut')
-rw-r--r--library/cpp/messagebus/test/ut/messagebus_ut.cpp94
-rw-r--r--library/cpp/messagebus/test/ut/module_client_one_way_ut.cpp6
-rw-r--r--library/cpp/messagebus/test/ut/module_client_ut.cpp46
-rw-r--r--library/cpp/messagebus/test/ut/module_server_ut.cpp14
-rw-r--r--library/cpp/messagebus/test/ut/one_way_ut.cpp24
-rw-r--r--library/cpp/messagebus/test/ut/starter_ut.cpp20
-rw-r--r--library/cpp/messagebus/test/ut/sync_client_ut.cpp4
7 files changed, 104 insertions, 104 deletions
diff --git a/library/cpp/messagebus/test/ut/messagebus_ut.cpp b/library/cpp/messagebus/test/ut/messagebus_ut.cpp
index b333e2fe23..040f9b7702 100644
--- a/library/cpp/messagebus/test/ut/messagebus_ut.cpp
+++ b/library/cpp/messagebus/test/ut/messagebus_ut.cpp
@@ -31,7 +31,7 @@ namespace {
}
void OnReply(TAutoPtr<TBusMessage> mess, TAutoPtr<TBusMessage> reply) override {
- Y_VERIFY(AtomicGet(SentCompleted), "must be completed");
+ Y_VERIFY(AtomicGet(SentCompleted), "must be completed");
TExampleClient::OnReply(mess, reply);
@@ -46,7 +46,7 @@ namespace {
}
-Y_UNIT_TEST_SUITE(TMessageBusTests) {
+Y_UNIT_TEST_SUITE(TMessageBusTests) {
void TestDestinationTemplate(bool useCompression, bool ackMessageBeforeReply,
const TBusServerSessionConfig& sessionConfig) {
TObjectCountCheck objectCountCheck;
@@ -66,19 +66,19 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
UNIT_ASSERT_EQUAL(client.Session->GetInFlight(), 0);
}
- Y_UNIT_TEST(TestDestination) {
+ Y_UNIT_TEST(TestDestination) {
TestDestinationTemplate(false, false, TBusServerSessionConfig());
}
- Y_UNIT_TEST(TestDestinationUsingAck) {
+ Y_UNIT_TEST(TestDestinationUsingAck) {
TestDestinationTemplate(false, true, TBusServerSessionConfig());
}
- Y_UNIT_TEST(TestDestinationWithCompression) {
+ Y_UNIT_TEST(TestDestinationWithCompression) {
TestDestinationTemplate(true, false, TBusServerSessionConfig());
}
- Y_UNIT_TEST(TestCork) {
+ Y_UNIT_TEST(TestCork) {
TBusServerSessionConfig config;
config.SendThreshold = 1000000000000;
config.Cork = TDuration::MilliSeconds(10);
@@ -86,7 +86,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
// TODO: test for cork hanging
}
- Y_UNIT_TEST(TestReconnect) {
+ Y_UNIT_TEST(TestReconnect) {
if (!IsFixedPortTestAllowed()) {
return;
}
@@ -136,7 +136,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
void OnError(TAutoPtr<TBusMessage> message, EMessageStatus status) override {
- Y_UNUSED(message);
+ Y_UNUSED(message);
Y_VERIFY(status == MESSAGE_CONNECT_FAILED, "must be MESSAGE_CONNECT_FAILED, got %s", ToString(status).data());
@@ -194,7 +194,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
UNIT_ASSERT_VALUES_EQUAL(client.Session->GetConfig()->MaxInFlight, count);
}
- Y_UNIT_TEST(TestHangindServer) {
+ Y_UNIT_TEST(TestHangindServer) {
TObjectCountCheck objectCountCheck;
THangingServer server(0);
@@ -202,13 +202,13 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
HangingServerImpl(server.GetPort());
}
- Y_UNIT_TEST(TestNoServer) {
+ Y_UNIT_TEST(TestNoServer) {
TObjectCountCheck objectCountCheck;
TestNoServerImpl(17, false);
}
- Y_UNIT_TEST(PauseInput) {
+ Y_UNIT_TEST(PauseInput) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -283,15 +283,15 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.ErrorHappened.WaitI();
}
- Y_UNIT_TEST(NoServer_SendTimeout_Callback_PeriodLess) {
+ Y_UNIT_TEST(NoServer_SendTimeout_Callback_PeriodLess) {
NoServer_SendTimeout_Callback_Impl(true);
}
- Y_UNIT_TEST(NoServer_SendTimeout_Callback_TimeoutLess) {
+ Y_UNIT_TEST(NoServer_SendTimeout_Callback_TimeoutLess) {
NoServer_SendTimeout_Callback_Impl(false);
}
- Y_UNIT_TEST(TestOnReplyCalledAfterOnMessageSent) {
+ Y_UNIT_TEST(TestOnReplyCalledAfterOnMessageSent) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -327,7 +327,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
void OnMessage(TOnMessageContext& mess) override {
- Y_VERIFY(mess.IsConnectionAlive(), "connection should be alive here");
+ Y_VERIFY(mess.IsConnectionAlive(), "connection should be alive here");
TAutoPtr<TOnMessageContext> delayedMsg(new TOnMessageContext);
delayedMsg->Swap(mess);
auto g(Guard(Lock_));
@@ -337,8 +337,8 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
bool CheckClientIsAlive() {
auto g(Guard(Lock_));
- for (auto& delayedMessage : DelayedMessages) {
- if (!delayedMessage->IsConnectionAlive()) {
+ for (auto& delayedMessage : DelayedMessages) {
+ if (!delayedMessage->IsConnectionAlive()) {
return false;
}
}
@@ -347,8 +347,8 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
bool CheckClientIsDead() const {
auto g(Guard(Lock_));
- for (const auto& delayedMessage : DelayedMessages) {
- if (delayedMessage->IsConnectionAlive()) {
+ for (const auto& delayedMessage : DelayedMessages) {
+ if (delayedMessage->IsConnectionAlive()) {
return false;
}
}
@@ -377,12 +377,12 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
void OnError(TAutoPtr<TBusMessage> mess, EMessageStatus status) override {
- Y_UNUSED(mess);
+ Y_UNUSED(mess);
Y_VERIFY(status == MESSAGE_SHUTDOWN, "only shutdown allowed, got %s", ToString(status).data());
}
};
- Y_UNIT_TEST(TestReplyCalledAfterClientDisconnected) {
+ Y_UNIT_TEST(TestReplyCalledAfterClientDisconnected) {
TObjectCountCheck objectCountCheck;
TDelayReplyServer server;
@@ -431,12 +431,12 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
void OnError(TAutoPtr<TBusMessage> mess, EMessageStatus status) override {
- Y_UNUSED(mess);
- Y_VERIFY(status == MESSAGE_SHUTDOWN, "only shutdown allowed");
+ Y_UNUSED(mess);
+ Y_VERIFY(status == MESSAGE_SHUTDOWN, "only shutdown allowed");
}
};
- Y_UNIT_TEST(PackUnpack) {
+ Y_UNIT_TEST(PackUnpack) {
TObjectCountCheck objectCountCheck;
TPackUnpackServer server;
@@ -446,7 +446,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client->SendMessagesWaitReplies(1, TNetAddr("localhost", server.Session->GetActualListenPort()));
}
- Y_UNIT_TEST(ClientRequestTooLarge) {
+ Y_UNIT_TEST(ClientRequestTooLarge) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -505,11 +505,11 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
void OnError(TAutoPtr<TBusMessage>, EMessageStatus status) override {
TestSync.WaitForAndIncrement(1);
- Y_VERIFY(status == MESSAGE_MESSAGE_TOO_LARGE, "status");
+ Y_VERIFY(status == MESSAGE_MESSAGE_TOO_LARGE, "status");
}
};
- Y_UNIT_TEST(ServerResponseTooLarge) {
+ Y_UNIT_TEST(ServerResponseTooLarge) {
TObjectCountCheck objectCountCheck;
TServerForResponseTooLarge server;
@@ -555,12 +555,12 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
TAutoPtr<TExampleResponse> resp(new TExampleResponse(&Proto.ResponseCount, 10));
req.SendReplyMove(resp);
} else {
- Y_FAIL("wrong");
+ Y_FAIL("wrong");
}
}
};
- Y_UNIT_TEST(ServerRequestTooLarge) {
+ Y_UNIT_TEST(ServerRequestTooLarge) {
TObjectCountCheck objectCountCheck;
TServerForRequestTooLarge server;
@@ -578,7 +578,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.WaitForError(MESSAGE_DELIVERY_FAILED);
}
- Y_UNIT_TEST(ClientResponseTooLarge) {
+ Y_UNIT_TEST(ClientResponseTooLarge) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -598,7 +598,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.WaitForError(MESSAGE_DELIVERY_FAILED);
}
- Y_UNIT_TEST(ServerUnknownMessage) {
+ Y_UNIT_TEST(ServerUnknownMessage) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -616,7 +616,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.WaitForError(MESSAGE_DELIVERY_FAILED);
}
- Y_UNIT_TEST(ServerMessageReservedIds) {
+ Y_UNIT_TEST(ServerMessageReservedIds) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -641,7 +641,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.WaitForError(MESSAGE_DELIVERY_FAILED);
}
- Y_UNIT_TEST(TestGetInFlightForDestination) {
+ Y_UNIT_TEST(TestGetInFlightForDestination) {
TObjectCountCheck objectCountCheck;
TDelayReplyServer server;
@@ -703,7 +703,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
};
- Y_UNIT_TEST(ResetAfterSendOneWayErrorInCallback) {
+ Y_UNIT_TEST(ResetAfterSendOneWayErrorInCallback) {
TObjectCountCheck objectCountCheck;
TNetAddr noServerAddr("localhost", 17);
@@ -739,7 +739,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
};
- Y_UNIT_TEST(ResetAfterSendMessageOneWayDuringShutdown) {
+ Y_UNIT_TEST(ResetAfterSendMessageOneWayDuringShutdown) {
TObjectCountCheck objectCountCheck;
TNetAddr noServerAddr("localhost", 17);
@@ -764,7 +764,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
delete message;
}
- Y_UNIT_TEST(ResetAfterSendOneWayErrorInReturn) {
+ Y_UNIT_TEST(ResetAfterSendOneWayErrorInReturn) {
TObjectCountCheck objectCountCheck;
TestNoServerImpl(17, true);
@@ -784,7 +784,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
};
- Y_UNIT_TEST(ResetAfterSendOneWaySuccess) {
+ Y_UNIT_TEST(ResetAfterSendOneWaySuccess) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -800,7 +800,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.TestSync.WaitForAndIncrement(2);
}
- Y_UNIT_TEST(GetStatus) {
+ Y_UNIT_TEST(GetStatus) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -818,7 +818,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.Bus->GetStatus();
}
- Y_UNIT_TEST(BindOnRandomPort) {
+ Y_UNIT_TEST(BindOnRandomPort) {
TObjectCountCheck objectCountCheck;
TBusServerSessionConfig serverConfig;
@@ -829,7 +829,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.SendMessagesWaitReplies(3, &addr);
}
- Y_UNIT_TEST(UnbindOnShutdown) {
+ Y_UNIT_TEST(UnbindOnShutdown) {
TBusMessageQueuePtr queue(CreateMessageQueue());
TExampleProtocol proto;
@@ -846,7 +846,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
THangingServer hangingServer(port);
}
- Y_UNIT_TEST(VersionNegotiation) {
+ Y_UNIT_TEST(VersionNegotiation) {
TObjectCountCheck objectCountCheck;
TExampleServer server;
@@ -928,7 +928,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
};
- Y_UNIT_TEST(OnClientConnectionEvent_Shutdown) {
+ Y_UNIT_TEST(OnClientConnectionEvent_Shutdown) {
TObjectCountCheck objectCountCheck;
TOnConnectionEventServer server;
@@ -946,7 +946,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
client.Sync.WaitForAndIncrement(3);
}
- Y_UNIT_TEST(OnClientConnectionEvent_Disconnect) {
+ Y_UNIT_TEST(OnClientConnectionEvent_Disconnect) {
TObjectCountCheck objectCountCheck;
THolder<TOnConnectionEventServer> server(new TOnConnectionEventServer);
@@ -1010,7 +1010,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
};
- Y_UNIT_TEST(WakeReaderOnQuota) {
+ Y_UNIT_TEST(WakeReaderOnQuota) {
const size_t test_msg_count = 64;
TBusClientSessionConfig clientConfig;
@@ -1061,7 +1061,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
server.WaitForOnMessageCount(test_msg_count);
};
- Y_UNIT_TEST(TestConnectionAttempts) {
+ Y_UNIT_TEST(TestConnectionAttempts) {
TObjectCountCheck objectCountCheck;
TNetAddr noServerAddr("localhost", 17);
@@ -1093,7 +1093,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
}
};
- Y_UNIT_TEST(TestConnectionAttemptsOnNoMessagesAndNotReconnectWhenIdle) {
+ Y_UNIT_TEST(TestConnectionAttemptsOnNoMessagesAndNotReconnectWhenIdle) {
TObjectCountCheck objectCountCheck;
TNetAddr noServerAddr("localhost", 17);
@@ -1120,7 +1120,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
UNIT_ASSERT_EQUAL(client.Session->GetConnectSyscallsNumForTest(noServerAddr), 2);
};
- Y_UNIT_TEST(TestConnectionAttemptsOnNoMessagesAndReconnectWhenIdle) {
+ Y_UNIT_TEST(TestConnectionAttemptsOnNoMessagesAndReconnectWhenIdle) {
TObjectCountCheck objectCountCheck;
TNetAddr noServerAddr("localhost", 17);
diff --git a/library/cpp/messagebus/test/ut/module_client_one_way_ut.cpp b/library/cpp/messagebus/test/ut/module_client_one_way_ut.cpp
index e7f2f5bd11..4083cf3b7b 100644
--- a/library/cpp/messagebus/test/ut/module_client_one_way_ut.cpp
+++ b/library/cpp/messagebus/test/ut/module_client_one_way_ut.cpp
@@ -9,7 +9,7 @@
using namespace NBus;
using namespace NBus::NTest;
-Y_UNIT_TEST_SUITE(ModuleClientOneWay) {
+Y_UNIT_TEST_SUITE(ModuleClientOneWay) {
struct TTestServer: public TBusServerHandlerError {
TExampleProtocol Proto;
@@ -66,7 +66,7 @@ Y_UNIT_TEST_SUITE(ModuleClientOneWay) {
}
};
- Y_UNIT_TEST(Simple) {
+ Y_UNIT_TEST(Simple) {
TTestSync testSync;
TTestServer server(&testSync);
@@ -122,7 +122,7 @@ Y_UNIT_TEST_SUITE(ModuleClientOneWay) {
}
};
- Y_UNIT_TEST(SendError) {
+ Y_UNIT_TEST(SendError) {
TTestSync testSync;
TBusQueueConfig queueConfig;
diff --git a/library/cpp/messagebus/test/ut/module_client_ut.cpp b/library/cpp/messagebus/test/ut/module_client_ut.cpp
index 16d2f22335..ebfe185cc6 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;
diff --git a/library/cpp/messagebus/test/ut/module_server_ut.cpp b/library/cpp/messagebus/test/ut/module_server_ut.cpp
index 4acc9e3f59..88fe1dd9b6 100644
--- a/library/cpp/messagebus/test/ut/module_server_ut.cpp
+++ b/library/cpp/messagebus/test/ut/module_server_ut.cpp
@@ -15,8 +15,8 @@
using namespace NBus;
using namespace NBus::NTest;
-Y_UNIT_TEST_SUITE(ModuleServerTests) {
- Y_UNIT_TEST(TestModule) {
+Y_UNIT_TEST_SUITE(ModuleServerTests) {
+ Y_UNIT_TEST(TestModule) {
TObjectCountCheck objectCountCheck;
/// create or get instance of message queue, need one per application
@@ -49,7 +49,7 @@ Y_UNIT_TEST_SUITE(ModuleServerTests) {
TJobHandler Start(TBusJob* job, TBusMessage* mess) override {
WaitTwoRequestsLatch.CountDown();
- Y_VERIFY(WaitTwoRequestsLatch.Await(TDuration::Seconds(5)), "oops");
+ Y_VERIFY(WaitTwoRequestsLatch.Await(TDuration::Seconds(5)), "oops");
VerifyDynamicCast<TExampleRequest*>(mess);
@@ -58,7 +58,7 @@ Y_UNIT_TEST_SUITE(ModuleServerTests) {
}
};
- Y_UNIT_TEST(TestOnMessageHandlerCalledInParallel) {
+ Y_UNIT_TEST(TestOnMessageHandlerCalledInParallel) {
TObjectCountCheck objectCountCheck;
TBusQueueConfig config;
@@ -79,18 +79,18 @@ Y_UNIT_TEST_SUITE(ModuleServerTests) {
TSystemEvent ClientDiedEvent;
TJobHandler Start(TBusJob* job, TBusMessage* mess) override {
- Y_UNUSED(mess);
+ Y_UNUSED(mess);
MessageReceivedEvent.Signal();
- Y_VERIFY(ClientDiedEvent.WaitT(TDuration::Seconds(5)), "oops");
+ Y_VERIFY(ClientDiedEvent.WaitT(TDuration::Seconds(5)), "oops");
job->SendReply(new TExampleResponse(&Proto.ResponseCount));
return nullptr;
}
};
- Y_UNIT_TEST(TestReplyCalledAfterClientDisconnected) {
+ Y_UNIT_TEST(TestReplyCalledAfterClientDisconnected) {
TObjectCountCheck objectCountCheck;
TBusQueueConfig config;
diff --git a/library/cpp/messagebus/test/ut/one_way_ut.cpp b/library/cpp/messagebus/test/ut/one_way_ut.cpp
index 7f18da400e..9c21227e2b 100644
--- a/library/cpp/messagebus/test/ut/one_way_ut.cpp
+++ b/library/cpp/messagebus/test/ut/one_way_ut.cpp
@@ -114,7 +114,7 @@ public:
void OnMessage(TOnMessageContext& mess) override {
TExampleRequest* fmess = static_cast<TExampleRequest*>(mess.GetMessage());
- Y_ASSERT(fmess->Data == "TADA");
+ Y_ASSERT(fmess->Data == "TADA");
/// tell session to forget this message and never expect any reply
mess.ForgetRequest();
@@ -124,13 +124,13 @@ public:
/// this handler should not be called because this server does not send replies
void OnSent(TAutoPtr<TBusMessage> mess) override {
- Y_UNUSED(mess);
- Y_FAIL("This server does not sent replies");
+ Y_UNUSED(mess);
+ Y_FAIL("This server does not sent replies");
}
};
-Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) {
- Y_UNIT_TEST(Simple) {
+Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) {
+ Y_UNIT_TEST(Simple) {
TObjectCountCheck objectCountCheck;
NullServer server;
@@ -166,15 +166,15 @@ Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) {
}
void OnError(TAutoPtr<TBusMessage> mess, EMessageStatus status) override {
- Y_UNUSED(mess);
+ Y_UNUSED(mess);
- Y_VERIFY(status == MESSAGE_MESSAGE_TOO_LARGE, "wrong status: %s", ToCString(status));
+ Y_VERIFY(status == MESSAGE_MESSAGE_TOO_LARGE, "wrong status: %s", ToCString(status));
GotTooLarge.Signal();
}
};
- Y_UNIT_TEST(MessageTooLargeOnClient) {
+ Y_UNIT_TEST(MessageTooLargeOnClient) {
TObjectCountCheck objectCountCheck;
NullServer server;
@@ -209,14 +209,14 @@ Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) {
/// message that could not be delivered
void OnError(TAutoPtr<TBusMessage> mess, EMessageStatus status) override {
- Y_UNUSED(mess);
- Y_UNUSED(status); // TODO: check status
+ Y_UNUSED(mess);
+ Y_UNUSED(status); // TODO: check status
GotError.Signal();
}
};
- Y_UNIT_TEST(SendTimeout_Callback_NoServer) {
+ Y_UNIT_TEST(SendTimeout_Callback_NoServer) {
TObjectCountCheck objectCountCheck;
TCheckTimeoutClient client(TNetAddr("localhost", 17));
@@ -227,7 +227,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests_OneWay) {
client.GotError.WaitI();
}
- Y_UNIT_TEST(SendTimeout_Callback_HangingServer) {
+ Y_UNIT_TEST(SendTimeout_Callback_HangingServer) {
THangingServer server;
TObjectCountCheck objectCountCheck;
diff --git a/library/cpp/messagebus/test/ut/starter_ut.cpp b/library/cpp/messagebus/test/ut/starter_ut.cpp
index 76d688b62e..dd4d3aaa5e 100644
--- a/library/cpp/messagebus/test/ut/starter_ut.cpp
+++ b/library/cpp/messagebus/test/ut/starter_ut.cpp
@@ -7,7 +7,7 @@
using namespace NBus;
using namespace NBus::NTest;
-Y_UNIT_TEST_SUITE(TBusStarterTest) {
+Y_UNIT_TEST_SUITE(TBusStarterTest) {
struct TStartJobTestModule: public TExampleModule {
using TBusModule::CreateDefaultStarter;
@@ -19,21 +19,21 @@ Y_UNIT_TEST_SUITE(TBusStarterTest) {
}
TJobHandler Start(TBusJob* job, TBusMessage* mess) override {
- Y_UNUSED(mess);
+ Y_UNUSED(mess);
AtomicIncrement(StartCount);
job->Sleep(10);
return &TStartJobTestModule::End;
}
TJobHandler End(TBusJob* job, TBusMessage* mess) {
- Y_UNUSED(mess);
+ Y_UNUSED(mess);
AtomicIncrement(StartCount);
job->Cancel(MESSAGE_UNKNOWN);
return nullptr;
}
};
- Y_UNIT_TEST(Test) {
+ Y_UNIT_TEST(Test) {
TObjectCountCheck objectCountCheck;
TBusMessageQueuePtr bus(CreateMessageQueue());
@@ -55,7 +55,7 @@ Y_UNIT_TEST_SUITE(TBusStarterTest) {
bus->Stop();
}
- Y_UNIT_TEST(TestModuleStartJob) {
+ Y_UNIT_TEST(TestModuleStartJob) {
TObjectCountCheck objectCountCheck;
TExampleProtocol proto;
@@ -79,7 +79,7 @@ Y_UNIT_TEST_SUITE(TBusStarterTest) {
TSystemEvent MessageReceivedEvent;
TJobHandler Start(TBusJob* job, TBusMessage* mess) override {
- Y_UNUSED(mess);
+ Y_UNUSED(mess);
MessageReceivedEvent.Signal();
@@ -89,12 +89,12 @@ Y_UNIT_TEST_SUITE(TBusStarterTest) {
}
TJobHandler Never(TBusJob*, TBusMessage*) {
- Y_FAIL("happens");
+ Y_FAIL("happens");
throw 1;
}
};
- Y_UNIT_TEST(StartJobDestroyDuringSleep) {
+ Y_UNIT_TEST(StartJobDestroyDuringSleep) {
TObjectCountCheck objectCountCheck;
TExampleProtocol proto;
@@ -114,7 +114,7 @@ Y_UNIT_TEST_SUITE(TBusStarterTest) {
TSystemEvent MessageReceivedEvent;
TJobHandler Start(TBusJob* job, TBusMessage* mess) override {
- Y_UNUSED(mess);
+ Y_UNUSED(mess);
job->SendReply(new TExampleResponse(&Proto.ResponseCount));
@@ -124,7 +124,7 @@ Y_UNIT_TEST_SUITE(TBusStarterTest) {
}
};
- Y_UNIT_TEST(AllowSendReplyInStarted) {
+ Y_UNIT_TEST(AllowSendReplyInStarted) {
TObjectCountCheck objectCountCheck;
TExampleProtocol proto;
diff --git a/library/cpp/messagebus/test/ut/sync_client_ut.cpp b/library/cpp/messagebus/test/ut/sync_client_ut.cpp
index 735aa06569..400128193f 100644
--- a/library/cpp/messagebus/test/ut/sync_client_ut.cpp
+++ b/library/cpp/messagebus/test/ut/sync_client_ut.cpp
@@ -50,8 +50,8 @@ namespace NBus {
}
};
- Y_UNIT_TEST_SUITE(SyncClientTest) {
- Y_UNIT_TEST(TestSync) {
+ Y_UNIT_TEST_SUITE(SyncClientTest) {
+ Y_UNIT_TEST(TestSync) {
TObjectCountCheck objectCountCheck;
TExampleServer server;