From c822e57aef3dd2dc182513e7380de81d0d4f72e2 Mon Sep 17 00:00:00 2001 From: xiao-77 Date: Tue, 24 Dec 2024 22:57:51 +0800 Subject: [PATCH] fix windows build. --- source/util/test/cfgTest.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/util/test/cfgTest.cpp b/source/util/test/cfgTest.cpp index 3894ca1061..74c34f5c91 100644 --- a/source/util/test/cfgTest.cpp +++ b/source/util/test/cfgTest.cpp @@ -10,10 +10,12 @@ */ #include -#include -#include "osFile.h" #include "tconfig.h" +#ifndef WINDOWS +#include "osFile.h" +#endif + class CfgTest : public ::testing::Test { protected: static void SetUpTestSuite() {} @@ -303,7 +305,6 @@ TEST_F(CfgTest, cfgLoadFromEnvVar) { ASSERT_EQ(cfgLoad(pConfig, CFG_STYPE_ENV_VAR, "test_bool"), TSDB_CODE_SUCCESS); } -#endif TEST_F(CfgTest, cfgLoadFromEnvCmd) { SConfig *pConfig = NULL; @@ -367,4 +368,6 @@ TEST_F(CfgTest, cfgLoadFromApollUrl) { ASSERT_EQ(cfgLoad(pConfig, CFG_STYPE_APOLLO_URL, str), 0); taosRemoveFile(jsonFilePath); -} \ No newline at end of file +} + +#endif \ No newline at end of file