fix:case error
This commit is contained in:
parent
1c56c5ab83
commit
174b0a104e
|
@ -292,16 +292,16 @@ static void storeOffsetRows(SMnode *pMnode, SMqHbReq *req, SMqConsumerObj *pCons
|
||||||
static int32_t buildMqHbRsp(SRpcMsg *pMsg, SMqHbRsp *rsp){
|
static int32_t buildMqHbRsp(SRpcMsg *pMsg, SMqHbRsp *rsp){
|
||||||
int32_t tlen = tSerializeSMqHbRsp(NULL, 0, rsp);
|
int32_t tlen = tSerializeSMqHbRsp(NULL, 0, rsp);
|
||||||
if (tlen <= 0){
|
if (tlen <= 0){
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_TMQ_INVALID_MSG;
|
||||||
}
|
}
|
||||||
void *buf = rpcMallocCont(tlen);
|
void *buf = rpcMallocCont(tlen);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tSerializeSMqHbRsp(buf, tlen, rsp) != 0){
|
if(tSerializeSMqHbRsp(buf, tlen, rsp) <= 0){
|
||||||
rpcFreeCont(buf);
|
rpcFreeCont(buf);
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_TMQ_INVALID_MSG;
|
||||||
}
|
}
|
||||||
pMsg->info.rsp = buf;
|
pMsg->info.rsp = buf;
|
||||||
pMsg->info.rspLen = tlen;
|
pMsg->info.rspLen = tlen;
|
||||||
|
@ -316,7 +316,7 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) {
|
||||||
SMqConsumerObj *pConsumer = NULL;
|
SMqConsumerObj *pConsumer = NULL;
|
||||||
|
|
||||||
if (tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req) < 0) {
|
if (tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req) < 0) {
|
||||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
code = TSDB_CODE_TMQ_INVALID_MSG;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,9 +96,28 @@ class TDTestCase:
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
tdSql.query("select * from sta")
|
tdSql.query("select * from sta")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
|
tdSql.query("select tbname from sta order by tbname")
|
||||||
|
if not tdSql.getData(0, 0).startswith('new-t1_1.d1.sta_'):
|
||||||
|
tdLog.exit("error1")
|
||||||
|
|
||||||
|
if not tdSql.getData(1, 0).startswith('new-t2_1.d1.sta_'):
|
||||||
|
tdLog.exit("error2")
|
||||||
|
|
||||||
|
if not tdSql.getData(2, 0).startswith('new-t3_1.d1.sta_'):
|
||||||
|
tdLog.exit("error3")
|
||||||
|
|
||||||
tdSql.query("select * from stb")
|
tdSql.query("select * from stb")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
|
tdSql.query("select tbname from stb order by tbname")
|
||||||
|
if not tdSql.getData(0, 0).startswith('new-t1_1.d1.stb_'):
|
||||||
|
tdLog.exit("error4")
|
||||||
|
|
||||||
|
if not tdSql.getData(1, 0).startswith('new-t2_1.d1.stb_'):
|
||||||
|
tdLog.exit("error5")
|
||||||
|
|
||||||
|
if not tdSql.getData(2, 0).startswith('new-t3_1.d1.stb_'):
|
||||||
|
tdLog.exit("error6")
|
||||||
|
|
||||||
# run
|
# run
|
||||||
def run(self):
|
def run(self):
|
||||||
self.case1()
|
self.case1()
|
||||||
|
|
Loading…
Reference in New Issue