diff --git a/source/dnode/mgmt/impl/src/dndDnode.c b/source/dnode/mgmt/impl/src/dndDnode.c index c67e55f0484b32ddafbdde2194ef9b6692ff6033..ca0552b8ad6da298b6dde212b0728acffd6ef0cb 100644 --- a/source/dnode/mgmt/impl/src/dndDnode.c +++ b/source/dnode/mgmt/impl/src/dndDnode.c @@ -17,6 +17,7 @@ #include "dndDnode.h" #include "dndTransport.h" #include "dndVnodes.h" +#include "dndMnode.h" static int32_t dndInitMgmtWorker(SDnode *pDnode); static void dndCleanupMgmtWorker(SDnode *pDnode); @@ -28,10 +29,10 @@ static int32_t dndReadDnodes(SDnode *pDnode); static int32_t dndWriteDnodes(SDnode *pDnode); static void *dnodeThreadRoutine(void *param); -static void dndProcessConfigDnodeReq(SDnode *pDnode, SRpcMsg *pMsg); -static void dndProcessStatusRsp(SDnode *pDnode, SRpcMsg *pMsg); -static void dndProcessAuthRsp(SDnode *pDnode, SRpcMsg *pMsg); -static void dndProcessGrantRsp(SDnode *pDnode, SRpcMsg *pMsg); +static int32_t dndProcessConfigDnodeReq(SDnode *pDnode, SRpcMsg *pMsg); +static void dndProcessStatusRsp(SDnode *pDnode, SRpcMsg *pMsg); +static void dndProcessAuthRsp(SDnode *pDnode, SRpcMsg *pMsg); +static void dndProcessGrantRsp(SDnode *pDnode, SRpcMsg *pMsg); int32_t dndGetDnodeId(SDnode *pDnode) { SDnodeMgmt *pMgmt = &pDnode->dmgmt; @@ -458,13 +459,11 @@ static void dndProcessAuthRsp(SDnode *pDnode, SRpcMsg *pMsg) { assert(1); } static void dndProcessGrantRsp(SDnode *pDnode, SRpcMsg *pMsg) { assert(1); } -static void dndProcessConfigDnodeReq(SDnode *pDnode, SRpcMsg *pMsg) { +static int32_t dndProcessConfigDnodeReq(SDnode *pDnode, SRpcMsg *pMsg) { dError("config msg is received, but not supported yet"); SCfgDnodeMsg *pCfg = pMsg->pCont; - int32_t code = TSDB_CODE_OPS_NOT_SUPPORT; - SRpcMsg rspMsg = {.handle = pMsg->handle, .pCont = NULL, .contLen = 0, .code = code}; - rpcSendResponse(&rspMsg); + return TSDB_CODE_OPS_NOT_SUPPORT; } void dndProcessStartupReq(SDnode *pDnode, SRpcMsg *pMsg) { @@ -646,11 +645,8 @@ static void dndProcessMgmtQueue(SDnode *pDnode, SRpcMsg *pMsg) { case TDMT_DND_DROP_MNODE: code = dndProcessDropMnodeReq(pDnode, pMsg); break; - case TDMT_DND_NETWORK_TEST: - dndProcessStartupReq(pDnode, pMsg); - break; case TDMT_DND_CONFIG_DNODE: - dndProcessConfigDnodeReq(pDnode, pMsg); + code = dndProcessConfigDnodeReq(pDnode, pMsg); break; case TDMT_MND_STATUS_RSP: dndProcessStatusRsp(pDnode, pMsg); diff --git a/source/dnode/mgmt/impl/test/sut/src/base.cpp b/source/dnode/mgmt/impl/test/sut/src/base.cpp index f3fe8cfa864549b511549009437492ecd38f1c66..98371e989397c56e0fea907f5d7752ab4703e096 100644 --- a/source/dnode/mgmt/impl/test/sut/src/base.cpp +++ b/source/dnode/mgmt/impl/test/sut/src/base.cpp @@ -31,6 +31,7 @@ void Testbase::InitLog(const char* path) { tsdbDebugFlag = 0; cqDebugFlag = 0; tscEmbeddedInUtil = 1; + tsAsyncLog = 0; taosRemoveDir(path); taosMkDir(path); @@ -47,7 +48,7 @@ void Testbase::Init(const char* path, int16_t port) { char firstEp[TSDB_EP_LEN] = {0}; snprintf(firstEp, TSDB_EP_LEN, "%s:%u", fqdn, port); - InitLog("/tmp/tdlog"); + InitLog("/tmp/td"); server.Start(path, fqdn, port, firstEp); client.Init("root", "taosdata", fqdn, port); taosMsleep(1100); diff --git a/tests/script/general/db/basic1.sim b/tests/script/general/db/basic1.sim index 666a9dfd9e2a1e641dad52b84006bae1634db524..618b1377b87137eb8509790473d79151dd1151d8 100644 --- a/tests/script/general/db/basic1.sim +++ b/tests/script/general/db/basic1.sim @@ -58,4 +58,11 @@ if $data03 != 0 then return -1 endi +print =============== show vgroups +sql use d4 + +if $rows == 0 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/basic1.sim b/tests/script/general/table/basic1.sim index ded8d79a3fc814aa82eef1a658d12c6ae14aab12..04e44f730819e6fccb105416c1904b199813f47a 100644 --- a/tests/script/general/table/basic1.sim +++ b/tests/script/general/table/basic1.sim @@ -23,6 +23,15 @@ endi print $data00 $data01 $data02 +sql create table st2 (ts timestamp, i float) tags (j bigint) +sql show stables +if $rows != 2 then + return -1 +endi + +print $data00 $data01 $data02 +print $data00 $data11 $data12 + return print =============== create child table diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 1cc15f731d343d63b7894e7e5c43b66364cf169f..0ef43aacedabd9e509e0f7c1b05dfd8a81d18bbe 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -7,5 +7,7 @@ # ---- db ./test.sh -f general/db/basic1.sim +# ---- table +./test.sh -f general/table/basic1.sim #======================b1-end===============