From d0d5921cf92ea15464f9ff4856c34b026a30ffb0 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 12 Sep 2024 14:39:05 +0200 Subject: Remove Compatibility flag from tests --- test/utils/test_env.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/utils/test_env.hpp') diff --git a/test/utils/test_env.hpp b/test/utils/test_env.hpp index fc6ac739..ec03a9ee 100644 --- a/test/utils/test_env.hpp +++ b/test/utils/test_env.hpp @@ -40,10 +40,12 @@ return properties; } -static inline void ReadCompatibilityFromEnv() { - auto* compatible = std::getenv("COMPATIBLE"); - if (compatible != nullptr) { - ProtocolTraits::Instance().SetCompatible(); +[[nodiscard]] static inline auto ReadCompatibilityFromEnv() noexcept + -> std::optional { + try { + return std::getenv("COMPATIBLE") != nullptr; + } catch (...) { + return std::nullopt; } } -- cgit v1.2.3