@@ -24,7 +24,7 @@ namespace {
24
24
{
25
25
Y_UNUSED (context);
26
26
27
- Cerr << " ListEndpoints: " << request->ShortDebugString () << Endl ;
27
+ std::cerr << " ListEndpoints: " << request->ShortDebugString () << std::endl ;
28
28
29
29
const auto * result = MockResults.FindPtr (request->database ());
30
30
Y_ABORT_UNLESS (result, " Mock service doesn't have a result for database '%s'" , request->database ().c_str ());
@@ -50,7 +50,7 @@ namespace {
50
50
{
51
51
Y_UNUSED (context);
52
52
53
- Cerr << " Session stream started" << Endl ;
53
+ std::cerr << " Session stream started" << std::endl ;
54
54
55
55
Ydb::Coordination::SessionRequest request;
56
56
@@ -60,7 +60,7 @@ namespace {
60
60
// Disconnected before the request was sent
61
61
return grpc::Status::OK;
62
62
}
63
- Cerr << " Session request: " << request.ShortDebugString () << Endl ;
63
+ std::cerr << " Session request: " << request.ShortDebugString () << std::endl ;
64
64
Y_ABORT_UNLESS (request.has_session_start (), " Expected session start" );
65
65
auto & start = request.session_start ();
66
66
uint64_t sessionId = start.session_id ();
@@ -77,7 +77,7 @@ namespace {
77
77
78
78
size_t pings_received = 0 ;
79
79
while (stream->Read (&request)) {
80
- Cerr << " Session request: " << request.ShortDebugString () << Endl ;
80
+ std::cerr << " Session request: " << request.ShortDebugString () << std::endl ;
81
81
Y_ABORT_UNLESS (request.has_ping (), " Only ping requests are supported" );
82
82
if (++pings_received <= 2 ) {
83
83
// Only reply to the first 2 ping requests
@@ -134,11 +134,11 @@ Y_UNIT_TEST_SUITE(Coordination) {
134
134
135
135
// Start our mock discovery service
136
136
ui16 discoveryPort = pm.GetPort ();
137
- std::string discoveryAddr = TYdbStringBuilder () << " 0.0.0.0:" << discoveryPort;
137
+ std::string discoveryAddr = TStringBuilder () << " 0.0.0.0:" << discoveryPort;
138
138
auto discoveryServer = StartGrpcServer (discoveryAddr, discoveryService);
139
139
140
140
auto config = TDriverConfig ()
141
- .SetEndpoint (TYdbStringBuilder () << " localhost:" << discoveryPort)
141
+ .SetEndpoint (TStringBuilder () << " localhost:" << discoveryPort)
142
142
.SetDatabase (" /Root/My/DB" );
143
143
TDriver driver (config);
144
144
TClient client (driver);
@@ -152,7 +152,7 @@ Y_UNIT_TEST_SUITE(Coordination) {
152
152
auto endTimestamp = TInstant::Now ();
153
153
auto elapsed = endTimestamp - startTimestamp;
154
154
155
- Cerr << " Got: " << res.GetStatus () << " : " << res.GetIssues ().ToString () << Endl ;
155
+ std::cerr << " Got: " << ToString ( res.GetStatus ()) << " : " << res.GetIssues ().ToString () << std::endl ;
156
156
157
157
// Both connection and session timeout return EStatus::TIMEOUT
158
158
UNIT_ASSERT_VALUES_EQUAL_C (res.GetStatus (), EStatus::TIMEOUT, res.GetIssues ().ToString ());
@@ -168,7 +168,7 @@ Y_UNIT_TEST_SUITE(Coordination) {
168
168
TMockCoordinationService coordinationService;
169
169
ui16 coordinationPort = pm.GetPort ();
170
170
auto coordinationServer = StartGrpcServer (
171
- TYdbStringBuilder () << " 0.0.0.0:" << coordinationPort,
171
+ TStringBuilder () << " 0.0.0.0:" << coordinationPort,
172
172
coordinationService);
173
173
174
174
// Fill a fake discovery service
@@ -183,12 +183,12 @@ Y_UNIT_TEST_SUITE(Coordination) {
183
183
// Start a fake discovery service
184
184
ui16 discoveryPort = pm.GetPort ();
185
185
auto discoveryServer = StartGrpcServer (
186
- TYdbStringBuilder () << " 0.0.0.0:" << discoveryPort,
186
+ TStringBuilder () << " 0.0.0.0:" << discoveryPort,
187
187
discoveryService);
188
188
189
189
// Create a driver and a client
190
190
auto config = TDriverConfig ()
191
- .SetEndpoint (TYdbStringBuilder () << " localhost:" << discoveryPort)
191
+ .SetEndpoint (TStringBuilder () << " localhost:" << discoveryPort)
192
192
.SetDatabase (" /Root/My/DB" );
193
193
TDriver driver (config);
194
194
TClient client (driver);
@@ -197,7 +197,7 @@ Y_UNIT_TEST_SUITE(Coordination) {
197
197
auto stoppedFuture = stoppedPromise.GetFuture ();
198
198
auto settings = TSessionSettings ()
199
199
.OnStateChanged ([](auto state) {
200
- Cerr << " Session state: " << state << Endl ;
200
+ std::cerr << " Session state: " << ToString ( state) << std::endl ;
201
201
})
202
202
.OnStopped ([stoppedPromise]() mutable {
203
203
stoppedPromise.SetValue ();
@@ -221,7 +221,7 @@ Y_UNIT_TEST_SUITE(Coordination) {
221
221
222
222
// Check the last failure stored in a session
223
223
auto res2 = session.Close ().ExtractValueSync ();
224
- Cerr << " Close: " << res2.GetStatus () << " : " << res2.GetIssues ().ToString () << Endl ;
224
+ std::cerr << " Close: " << ToString ( res2.GetStatus ()) << " : " << res2.GetIssues ().ToString () << std::endl ;
225
225
UNIT_ASSERT_VALUES_EQUAL_C (res2.GetStatus (), EStatus::TIMEOUT, res2.GetIssues ().ToString ());
226
226
}
227
227
@@ -232,7 +232,7 @@ Y_UNIT_TEST_SUITE(Coordination) {
232
232
TMockCoordinationService coordinationService;
233
233
ui16 coordinationPort = pm.GetPort ();
234
234
auto coordinationServer = StartGrpcServer (
235
- TYdbStringBuilder () << " 0.0.0.0:" << coordinationPort,
235
+ TStringBuilder () << " 0.0.0.0:" << coordinationPort,
236
236
coordinationService);
237
237
238
238
// Fill a fake discovery service
@@ -247,12 +247,12 @@ Y_UNIT_TEST_SUITE(Coordination) {
247
247
// Start a fake discovery service
248
248
ui16 discoveryPort = pm.GetPort ();
249
249
auto discoveryServer = StartGrpcServer (
250
- TYdbStringBuilder () << " 0.0.0.0:" << discoveryPort,
250
+ TStringBuilder () << " 0.0.0.0:" << discoveryPort,
251
251
discoveryService);
252
252
253
253
// Create a driver and a client
254
254
auto config = TDriverConfig ()
255
- .SetEndpoint (TYdbStringBuilder () << " localhost:" << discoveryPort)
255
+ .SetEndpoint (TStringBuilder () << " localhost:" << discoveryPort)
256
256
.SetDatabase (" /Root/My/DB" );
257
257
std::optional<TDriver> driver (std::in_place, config);
258
258
std::optional<TClient> client (std::in_place, *driver);
@@ -261,7 +261,7 @@ Y_UNIT_TEST_SUITE(Coordination) {
261
261
auto stoppedFuture = stoppedPromise.GetFuture ();
262
262
auto settings = TSessionSettings ()
263
263
.OnStateChanged ([](auto state) {
264
- Cerr << " Session state: " << state << Endl ;
264
+ std::cerr << " Session state: " << ToString ( state) << std::endl ;
265
265
})
266
266
.OnStopped ([stoppedPromise]() mutable {
267
267
stoppedPromise.SetValue ();
@@ -288,7 +288,7 @@ Y_UNIT_TEST_SUITE(Coordination) {
288
288
289
289
// Check the last failure stored in a session
290
290
auto res2 = session.Close ().ExtractValueSync ();
291
- Cerr << " Close: " << res2.GetStatus () << " : " << res2.GetIssues ().ToString () << Endl ;
291
+ std::cerr << " Close: " << ToString ( res2.GetStatus ()) << " : " << res2.GetIssues ().ToString () << std::endl ;
292
292
UNIT_ASSERT_VALUES_EQUAL_C (res2.GetStatus (), EStatus::CLIENT_CANCELLED, res2.GetIssues ().ToString ());
293
293
}
294
294
0 commit comments