diff options
author | ilnurkh <ilnurkh@yandex-team.com> | 2023-10-09 23:39:40 +0300 |
---|---|---|
committer | ilnurkh <ilnurkh@yandex-team.com> | 2023-10-09 23:57:14 +0300 |
commit | e601ca03f859335d57ecff2e5aa6af234b6052ed (patch) | |
tree | de519a847e58a1b3993fcbfe05ff44cc946a3e24 /library/cpp/testing/common/network.cpp | |
parent | bbf2b6878af3854815a2c0ecb07a687071787639 (diff) | |
download | ydb-e601ca03f859335d57ecff2e5aa6af234b6052ed.tar.gz |
Y_VERIFY->Y_ABORT_UNLESS at ^l
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/testing/common/network.cpp')
-rw-r--r-- | library/cpp/testing/common/network.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/testing/common/network.cpp b/library/cpp/testing/common/network.cpp index 7a7ff2544c..a1f9f22e5a 100644 --- a/library/cpp/testing/common/network.cpp +++ b/library/cpp/testing/common/network.cpp @@ -105,7 +105,7 @@ namespace { if (!SyncDir_.IsDefined()) { SyncDir_ = TFsPath(GetSystemTempDir()) / "testing_port_locks"; } - Y_VERIFY(SyncDir_.IsDefined()); + Y_ABORT_UNLESS(SyncDir_.IsDefined()); NFs::MakeDirectoryRecursive(SyncDir_); Ranges_ = GetPortRanges(); @@ -113,7 +113,7 @@ namespace { for (auto [left, right] : Ranges_) { TotalCount_ += right - left; } - Y_VERIFY(0 != TotalCount_); + Y_ABORT_UNLESS(0 != TotalCount_); DisableRandomPorts_ = !GetEnv("NO_RANDOM_PORTS").empty(); } @@ -141,7 +141,7 @@ namespace { } TVector<NTesting::TPortHolder> GetFreePortsRange(size_t count) const { - Y_VERIFY(count > 0); + Y_ABORT_UNLESS(count > 0); TVector<NTesting::TPortHolder> ports(Reserve(count)); for (size_t i = 0; i < Retries; ++i) { for (auto[left, right] : Ranges_) { @@ -194,7 +194,7 @@ namespace { TSockAddrInet6 addr("::", port); if (sock.Bind(&addr) != 0) { lock->Release(); - Y_VERIFY(EADDRINUSE == LastSystemError(), "unexpected error: %d, port: %d", LastSystemError(), port); + Y_ABORT_UNLESS(EADDRINUSE == LastSystemError(), "unexpected error: %d, port: %d", LastSystemError(), port); return nullptr; } return MakeHolder<TPortGuard>(port, std::move(lock)); |