aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/test
diff options
context:
space:
mode:
authorprateek <prateek@yandex-team.ru>2022-02-10 16:50:32 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:32 +0300
commit06e925754c8de946ff79d538bde1e6424cbd4cbb (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/messagebus/test
parent30744531a4767f053be08b22b325594d7ed8ffb3 (diff)
downloadydb-06e925754c8de946ff79d538bde1e6424cbd4cbb.tar.gz
Restoring authorship annotation for <prateek@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/test')
-rw-r--r--library/cpp/messagebus/test/ut/sync_client_ut.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/messagebus/test/ut/sync_client_ut.cpp b/library/cpp/messagebus/test/ut/sync_client_ut.cpp
index b3d5e74652..400128193f 100644
--- a/library/cpp/messagebus/test/ut/sync_client_ut.cpp
+++ b/library/cpp/messagebus/test/ut/sync_client_ut.cpp
@@ -1,7 +1,7 @@
#include <library/cpp/messagebus/test/helper/example.h>
#include <library/cpp/messagebus/test/helper/object_count_check.h>
-
-namespace NBus {
+
+namespace NBus {
namespace NTest {
using namespace std;
@@ -9,34 +9,34 @@ namespace NBus {
/// \brief Client for sending synchronous message to local server
struct TSyncClient {
TNetAddr ServerAddr;
-
+
TExampleProtocol Proto;
TBusMessageQueuePtr Bus;
TBusSyncClientSessionPtr Session;
int NumReplies;
int NumMessages;
-
+
/// constructor creates instances of queue, protocol and session
TSyncClient(const TNetAddr& serverAddr)
: ServerAddr(serverAddr)
{
/// create or get instance of message queue, need one per application
Bus = CreateMessageQueue();
-
+
NumReplies = 0;
NumMessages = 10;
-
+
/// register source/client session
TBusClientSessionConfig sessionConfig;
Session = Bus->CreateSyncSource(&Proto, sessionConfig);
Session->RegisterService("localhost");
}
-
+
~TSyncClient() {
Session->Shutdown();
}
-
+
/// dispatch of requests is done here
void Work() {
for (int i = 0; i < NumMessages; i++) {
@@ -49,7 +49,7 @@ namespace NBus {
}
}
};
-
+
Y_UNIT_TEST_SUITE(SyncClientTest) {
Y_UNIT_TEST(TestSync) {
TObjectCountCheck objectCountCheck;
@@ -63,7 +63,7 @@ namespace NBus {
UNIT_ASSERT_EQUAL(server.Session->GetInFlight(), 0);
UNIT_ASSERT_EQUAL(client.Session->GetInFlight(), 0);
}
- }
-
+ }
+
}
}