fix:test case error
This commit is contained in:
parent
bd2bef2428
commit
ce2a3e4be2
|
@ -19,7 +19,7 @@
|
|||
#ifndef _GRANT
|
||||
|
||||
int32_t grantCheck(EGrantType grant) {
|
||||
if(taosGetTimestampMs() < 1706252996000) {
|
||||
if(taosGetTimestampMs() < 1706254434000) {
|
||||
uError("receivee no expired");
|
||||
return 0;
|
||||
} else{
|
||||
|
|
|
@ -3050,24 +3050,23 @@ int32_t suspendAllStreams(SMnode *pMnode, SRpcHandleInfo* info){
|
|||
if (pIter == NULL) break;
|
||||
|
||||
if(pStream->status != STREAM_STATUS__PAUSE){
|
||||
SMPauseStreamReq *reqPause = rpcMallocCont(sizeof(SMPauseStreamReq));
|
||||
if (reqPause == NULL) {
|
||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||
sdbRelease(pSdb, pStream);
|
||||
return -1;
|
||||
}
|
||||
strcpy(reqPause->name, pStream->name);
|
||||
reqPause->igNotExists = 1;
|
||||
SMPauseStreamReq reqPause = {0};
|
||||
strcpy(reqPause.name, pStream->name);
|
||||
reqPause.igNotExists = 1;
|
||||
|
||||
int32_t contLen = tSerializeSMPauseStreamReq(NULL, 0, &reqPause);
|
||||
void * pHead = rpcMallocCont(contLen);
|
||||
tSerializeSMPauseStreamReq(pHead, contLen, &reqPause);
|
||||
|
||||
SRpcMsg rpcMsg = {
|
||||
.msgType = TDMT_MND_PAUSE_STREAM,
|
||||
.pCont = reqPause,
|
||||
.contLen = sizeof(SMPauseStreamReq),
|
||||
.pCont = pHead,
|
||||
.contLen = contLen,
|
||||
.info = *info,
|
||||
};
|
||||
|
||||
tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg);
|
||||
mInfo("receivee pause stream:%s, %s, %p, because grant expired", pStream->name, reqPause->name, reqPause->name);
|
||||
mInfo("receivee pause stream:%s, %s, %p, because grant expired", pStream->name, reqPause.name, reqPause.name);
|
||||
}
|
||||
|
||||
sdbRelease(pSdb, pStream);
|
||||
|
|
|
@ -92,7 +92,7 @@ class TDTestCase:
|
|||
print(time.time())
|
||||
while 1:
|
||||
t = time.time()
|
||||
if t > 1706252996 :
|
||||
if t > 1706254434 :
|
||||
break
|
||||
else:
|
||||
print("time:%d" %(t))
|
||||
|
@ -100,12 +100,16 @@ class TDTestCase:
|
|||
|
||||
|
||||
tdSql.error("create stream s11 trigger at_once fill_history 1 into so1 as select ts,abs(col2) from stb partition by tbname")
|
||||
|
||||
time.sleep(10)
|
||||
tdSql.query("select * from information_schema.ins_stream_tasks")
|
||||
tdSql.checkData(0, 5, 'pause')
|
||||
tdSql.checkData(0, 5, 'paused')
|
||||
tdSql.execute("insert into stb_0(ts,col2) values(now, 3232)")
|
||||
tdSql.query("select * from so1")
|
||||
tdSql.checkRows(5)
|
||||
|
||||
tdSql.error("resume stream s1")
|
||||
|
||||
def consumeTest(self):
|
||||
consumer_dict = {
|
||||
"group.id": "g1",
|
||||
|
|
Loading…
Reference in New Issue