aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhcrc <whcrc@yandex-team.ru>2022-02-10 16:49:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:30 +0300
commitc8684fa83d799b720b948c7df1a6dc98cb249651 (patch)
tree8f88503dba71a02a3a0e8ab5513c020ebfb37a7a
parent9d2a99f5085a7425ef22831762c8684b687e0500 (diff)
downloadydb-c8684fa83d799b720b948c7df1a6dc98cb249651.tar.gz
Restoring authorship annotation for <whcrc@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--library/cpp/tvmauth/client/misc/api/settings.h2
-rw-r--r--library/cpp/tvmauth/client/misc/api/threaded_updater.cpp2
-rw-r--r--library/cpp/tvmauth/client/ut/tvmapi_updater_ut.cpp28
-rw-r--r--util/system/shellcommand.cpp46
4 files changed, 39 insertions, 39 deletions
diff --git a/library/cpp/tvmauth/client/misc/api/settings.h b/library/cpp/tvmauth/client/misc/api/settings.h
index 715ab3e02c..75657b3b73 100644
--- a/library/cpp/tvmauth/client/misc/api/settings.h
+++ b/library/cpp/tvmauth/client/misc/api/settings.h
@@ -9,7 +9,7 @@
#include <library/cpp/string_utils/secret_string/secret_string.h>
-#include <util/datetime/base.h>
+#include <util/datetime/base.h>
#include <util/generic/hash.h>
#include <util/generic/maybe.h>
diff --git a/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp b/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp
index a7df49c05d..a79f3d8dd2 100644
--- a/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp
+++ b/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp
@@ -102,7 +102,7 @@ namespace NTvmAuth::NTvmApi {
}
TThreadedUpdater::TThreadedUpdater(const TClientSettings& settings, TLoggerPtr logger)
- : TThreadedUpdaterBase(
+ : TThreadedUpdaterBase(
TRetrySettings{}.WorkerAwakingPeriod,
std::move(logger),
settings.GetTvmHost(),
diff --git a/library/cpp/tvmauth/client/ut/tvmapi_updater_ut.cpp b/library/cpp/tvmauth/client/ut/tvmapi_updater_ut.cpp
index 4cf449711b..465a01d401 100644
--- a/library/cpp/tvmauth/client/ut/tvmapi_updater_ut.cpp
+++ b/library/cpp/tvmauth/client/ut/tvmapi_updater_ut.cpp
@@ -1222,24 +1222,24 @@ Y_UNIT_TEST_SUITE(ApiUpdater) {
TNotInitedUpdater::AppendToJsonArray("[kek]",
{"sdlzkjvbsdljhfbsdajlhfbsakjdfb", "o92q83yh2uhq2eri23r"}));
}
-
- Y_UNIT_TEST(UpdaterTimeouts) {
- NTvmApi::TClientSettings s;
- s.SetSelfTvmId(100500);
- s.EnableServiceTicketChecking();
+
+ Y_UNIT_TEST(UpdaterTimeouts) {
+ NTvmApi::TClientSettings s;
+ s.SetSelfTvmId(100500);
+ s.EnableServiceTicketChecking();
s.TvmHost = "localhost";
s.TvmPort = GetRandomPort();
- const auto timeout = TDuration::MilliSeconds(10);
+ const auto timeout = TDuration::MilliSeconds(10);
s.TvmConnectTimeout = timeout;
s.TvmSocketTimeout = timeout;
-
- {
- auto l = MakeIntrusive<TLogger>();
- auto startTs = ::Now();
- UNIT_ASSERT_EXCEPTION(NTvmApi::TThreadedUpdater::Create(s, l), yexception);
- UNIT_ASSERT_LT(::Now() - startTs, timeout * 2);
- }
- }
+
+ {
+ auto l = MakeIntrusive<TLogger>();
+ auto startTs = ::Now();
+ UNIT_ASSERT_EXCEPTION(NTvmApi::TThreadedUpdater::Create(s, l), yexception);
+ UNIT_ASSERT_LT(::Now() - startTs, timeout * 2);
+ }
+ }
}
template <>
diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp
index b1989b5c8c..d4c85f2b3d 100644
--- a/util/system/shellcommand.cpp
+++ b/util/system/shellcommand.cpp
@@ -1057,10 +1057,10 @@ void TShellCommand::TImpl::Communicate(TProcessInfo* pi) {
}
DBG(Cerr << "process finished" << Endl);
- // What's the reason of process exit.
- // We need to set exit code before waiting for input thread
- // Otherwise there is no way for input stream provider to discover
- // that process has exited and stream shouldn't wait for new data.
+ // What's the reason of process exit.
+ // We need to set exit code before waiting for input thread
+ // Otherwise there is no way for input stream provider to discover
+ // that process has exited and stream shouldn't wait for new data.
bool cleanExit = false;
TMaybe<int> processExitCode;
#if defined(_unix_)
@@ -1088,25 +1088,25 @@ void TShellCommand::TImpl::Communicate(TProcessInfo* pi) {
} else {
AtomicSet(pi->Parent->ExecutionStatus, SHELL_ERROR);
}
-
-#if defined(_win_)
- for (auto& threadHolder : streamThreads)
- threadHolder->Join();
- for (const auto pump : pumps) {
- if (!pump.InternalError.empty())
- throw yexception() << pump.InternalError;
- }
-#else
- // Now let's read remaining stdout/stderr
- while (output && (bytes = pi->OutputFd.Read(buffer.Data(), buffer.Capacity())) > 0) {
- DBG(Cerr << bytes << " more bytes of output: " << Endl);
- output->Write(buffer.Data(), bytes);
- }
- while (error && (bytes = pi->ErrorFd.Read(buffer.Data(), buffer.Capacity())) > 0) {
- DBG(Cerr << bytes << " more bytes of error" << Endl);
- error->Write(buffer.Data(), bytes);
- }
-#endif
+
+#if defined(_win_)
+ for (auto& threadHolder : streamThreads)
+ threadHolder->Join();
+ for (const auto pump : pumps) {
+ if (!pump.InternalError.empty())
+ throw yexception() << pump.InternalError;
+ }
+#else
+ // Now let's read remaining stdout/stderr
+ while (output && (bytes = pi->OutputFd.Read(buffer.Data(), buffer.Capacity())) > 0) {
+ DBG(Cerr << bytes << " more bytes of output: " << Endl);
+ output->Write(buffer.Data(), bytes);
+ }
+ while (error && (bytes = pi->ErrorFd.Read(buffer.Data(), buffer.Capacity())) > 0) {
+ DBG(Cerr << bytes << " more bytes of error" << Endl);
+ error->Write(buffer.Data(), bytes);
+ }
+#endif
} catch (const yexception& e) {
// Some error in watch occured, set result to error
AtomicSet(pi->Parent->ExecutionStatus, SHELL_INTERNAL_ERROR);