fix:offset error in tmq & add test cases
This commit is contained in:
parent
78fd70202c
commit
ab9ad7d088
|
@ -36,7 +36,7 @@ class TDTestCase:
|
||||||
# tdDnodes[1].cfgDir
|
# tdDnodes[1].cfgDir
|
||||||
|
|
||||||
cfgFile = f"%s/taos.cfg"%(cfgDir)
|
cfgFile = f"%s/taos.cfg"%(cfgDir)
|
||||||
shellCmd = 'echo "tmqMaxTopicNum %d" >> %s'%(tmqMaxTopicNum, cfgFile)
|
shellCmd = 'echo tmqMaxTopicNum %d >> %s'%(tmqMaxTopicNum, cfgFile)
|
||||||
tdLog.info(" shell cmd: %s"%(shellCmd))
|
tdLog.info(" shell cmd: %s"%(shellCmd))
|
||||||
os.system(shellCmd)
|
os.system(shellCmd)
|
||||||
tdDnodes.stoptaosd(1)
|
tdDnodes.stoptaosd(1)
|
||||||
|
|
|
@ -194,7 +194,7 @@ void test_offset(TAOS* pConn){
|
||||||
int64_t position = tmq_position(tmq, "tp", pAssign[i].vgId);
|
int64_t position = tmq_position(tmq, "tp", pAssign[i].vgId);
|
||||||
if(position == 0) continue;
|
if(position == 0) continue;
|
||||||
|
|
||||||
printf("position = %lld\n", position);
|
printf("position = %d\n", (int)position);
|
||||||
tmq_commit_offset_sync(tmq, "tp", pAssign[i].vgId, position);
|
tmq_commit_offset_sync(tmq, "tp", pAssign[i].vgId, position);
|
||||||
int64_t committed = tmq_committed(tmq, "tp", pAssign[i].vgId);
|
int64_t committed = tmq_committed(tmq, "tp", pAssign[i].vgId);
|
||||||
ASSERT(position == committed);
|
ASSERT(position == committed);
|
||||||
|
|
Loading…
Reference in New Issue