From 36c7d0f146b8642692b580e06839aa539e82827e Mon Sep 17 00:00:00 2001 From: xiao-77 Date: Fri, 6 Dec 2024 14:17:43 +0800 Subject: [PATCH] Fix ci cases. --- include/common/tglobal.h | 2 +- source/common/src/tglobal.c | 6 +++--- source/dnode/mnode/impl/src/mndConfig.c | 14 +++++++------- source/dnode/mnode/impl/test/profile/profile.cpp | 10 ++-------- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 7ae0f5caf1..5f5805b4b9 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -160,7 +160,7 @@ extern bool tsEnableCrashReport; extern char *tsTelemUri; extern char *tsClientCrashReportUri; extern char *tsSvrCrashReportUri; -extern int8_t tsSafetyCheckLevel; +extern int32_t tsSafetyCheckLevel; enum { TSDB_SAFETY_CHECK_LEVELL_NEVER = 0, TSDB_SAFETY_CHECK_LEVELL_NORMAL = 1, diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index a52edfa187..2cffcf100e 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -145,9 +145,9 @@ bool tsEnableCrashReport = false; #else bool tsEnableCrashReport = true; #endif -char *tsClientCrashReportUri = "/ccrashreport"; -char *tsSvrCrashReportUri = "/dcrashreport"; -int8_t tsSafetyCheckLevel = TSDB_SAFETY_CHECK_LEVELL_NORMAL; +char *tsClientCrashReportUri = "/ccrashreport"; +char *tsSvrCrashReportUri = "/dcrashreport"; +int32_t tsSafetyCheckLevel = TSDB_SAFETY_CHECK_LEVELL_NORMAL; // schemaless bool tsSmlDot2Underline = true; diff --git a/source/dnode/mnode/impl/src/mndConfig.c b/source/dnode/mnode/impl/src/mndConfig.c index 5f4dcd8278..a2c439cfed 100644 --- a/source/dnode/mnode/impl/src/mndConfig.c +++ b/source/dnode/mnode/impl/src/mndConfig.c @@ -536,18 +536,18 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) { code = TSDB_CODE_CFG_NOT_FOUND; goto _err_out; } - -_send_req: if (pItem->category == CFG_CATEGORY_GLOBAL) { TAOS_CHECK_GOTO(mndConfigUpdateTrans(pMnode, dcfgReq.config, dcfgReq.value, pItem->dtype, ++vObj->i32), &lino, _err_out); } - { // audit - char obj[50] = {0}; - (void)sprintf(obj, "%d", cfgReq.dnodeId); +_send_req : - auditRecord(pReq, pMnode->clusterId, "alterDnode", obj, "", cfgReq.sql, cfgReq.sqlLen); - } +{ // audit + char obj[50] = {0}; + (void)sprintf(obj, "%d", cfgReq.dnodeId); + + auditRecord(pReq, pMnode->clusterId, "alterDnode", obj, "", cfgReq.sql, cfgReq.sqlLen); +} tFreeSMCfgDnodeReq(&cfgReq); diff --git a/source/dnode/mnode/impl/test/profile/profile.cpp b/source/dnode/mnode/impl/test/profile/profile.cpp index 68bd8cab40..15b90463b6 100644 --- a/source/dnode/mnode/impl/test/profile/profile.cpp +++ b/source/dnode/mnode/impl/test/profile/profile.cpp @@ -57,14 +57,8 @@ TEST_F(MndTestProfile, 01_ConnectMsg) { EXPECT_NE(connectRsp.connId, 0); EXPECT_EQ(connectRsp.superUser, 1); - EXPECT_EQ(connectRsp.epSet.inUse, 0); - EXPECT_EQ(connectRsp.epSet.numOfEps, 1); - EXPECT_EQ(connectRsp.epSet.eps[0].port, 6030); - char defaultFqdn[TSDB_FQDN_LEN] = {0}; - if (taosGetFqdn(defaultFqdn) != 0) { - (void)strcpy(defaultFqdn, "localhost"); - } - EXPECT_STREQ(connectRsp.epSet.eps[0].fqdn, defaultFqdn); + EXPECT_EQ(connectRsp.epSet.eps[0].port, 9031); + EXPECT_STREQ(connectRsp.epSet.eps[0].fqdn, "localhost"); connId = connectRsp.connId; }