minor changes

This commit is contained in:
Shengliang Guan 2022-04-06 20:01:00 +08:00
parent aee4c7a25e
commit c53489204c
3 changed files with 10 additions and 7 deletions

View File

@ -89,7 +89,7 @@ static int32_t dndNewProc(SMgmtWrapper *pWrapper, ENodeType n) {
} }
static void dndProcessProcHandle(void *handle) { static void dndProcessProcHandle(void *handle) {
dInfo("handle:%p, the child process dies and send an offline rsp", handle); dWarn("handle:%p, the child process dies and send an offline rsp", handle);
SRpcMsg rpcMsg = {.handle = handle, .code = TSDB_CODE_DND_OFFLINE}; SRpcMsg rpcMsg = {.handle = handle, .code = TSDB_CODE_DND_OFFLINE};
rpcSendResponse(&rpcMsg); rpcSendResponse(&rpcMsg);
} }

View File

@ -106,7 +106,7 @@ SDnode *dndCreate(const SDnodeOpt *pOption) {
} }
if (dndInitMsgHandle(pDnode) != 0) { if (dndInitMsgHandle(pDnode) != 0) {
dError("failed to msg handles since %s", terrstr()); dError("failed to init msg handles since %s", terrstr());
goto _OVER; goto _OVER;
} }

View File

@ -10,16 +10,14 @@
*/ */
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "sut.h"
#include "tprocess.h" #include "tprocess.h"
#include "tqueue.h" #include "tqueue.h"
#include "trpc.h" #include "trpc.h"
#include "tlog.h"
class UtilTesProc : public ::testing::Test { class UtilTesProc : public ::testing::Test {
public: public:
void SetUp() override { void SetUp() override {
test.InitLog("/tmp/td");
// uDebugFlag = 207;
shm.id = -1; shm.id = -1;
for (int32_t i = 0; i < 4000; ++i) { for (int32_t i = 0; i < 4000; ++i) {
body[i] = i % 26 + 'a'; body[i] = i % 26 + 'a';
@ -29,19 +27,24 @@ class UtilTesProc : public ::testing::Test {
head.msgType = 2; head.msgType = 2;
head.noResp = 3; head.noResp = 3;
head.persistHandle = 4; head.persistHandle = 4;
taosRemoveDir("/tmp/td");
taosMkDir("/tmp/td");
tstrncpy(tsLogDir, "/tmp/td", PATH_MAX);
if (taosInitLog("taosdlog", 1) != 0) {
printf("failed to init log file\n");
}
} }
void TearDown() override { taosDropShm(&shm); } void TearDown() override { taosDropShm(&shm); }
public: public:
static SRpcMsg head; static SRpcMsg head;
static char body[4000]; static char body[4000];
static Testbase test;
static SShm shm; static SShm shm;
static void SetUpTestSuite() {} static void SetUpTestSuite() {}
static void TearDownTestSuite() {} static void TearDownTestSuite() {}
}; };
Testbase UtilTesProc::test;
SShm UtilTesProc::shm; SShm UtilTesProc::shm;
char UtilTesProc::body[4000]; char UtilTesProc::body[4000];
SRpcMsg UtilTesProc::head; SRpcMsg UtilTesProc::head;