diff --git a/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim b/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim index d04338aadd9dfa0e197a0af562490322667c2078..878e3d9031f10f45b5623195e3e7c562aec88103 100644 --- a/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim +++ b/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim @@ -292,7 +292,7 @@ print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $ print ==> rows[1]: $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] if $rows != 2 then sleep 1000 - goto wait_consumer_end_from_ctb + goto wait_consumer_end_from_ntb endi if $data[0][1] == 0 then if $data[1][1] != 1 then diff --git a/tests/test/c/tmqSim.c b/tests/test/c/tmqSim.c index cf627fb5fb211e6319f82b2f21210846260be509..774c9574f769fd67e4009ac9d49bf26beeb1585a 100644 --- a/tests/test/c/tmqSim.c +++ b/tests/test/c/tmqSim.c @@ -125,13 +125,13 @@ void saveConfigToLogFile() { for (int32_t i = 0; i < g_stConfInfo.numOfThread; i++) { taosFprintfFile(g_fp, "# consumer %d info:\n", g_stConfInfo.stThreads[i].consumerId); taosFprintfFile(g_fp, " Topics: "); - for (int i = 0 ; i < g_stConfInfo.stThreads[i].numOfTopic; i++) { - taosFprintfFile(g_fp, "%s, ", g_stConfInfo.stThreads[i].topics[i]); + for (int j = 0 ; j < g_stConfInfo.stThreads[i].numOfTopic; j++) { + taosFprintfFile(g_fp, "%s, ", g_stConfInfo.stThreads[i].topics[j]); } taosFprintfFile(g_fp, "\n"); taosFprintfFile(g_fp, " Key: "); - for (int i = 0 ; i < g_stConfInfo.stThreads[i].numOfKey; i++) { - taosFprintfFile(g_fp, "%s:%s, ", g_stConfInfo.stThreads[i].key[i], g_stConfInfo.stThreads[i].value[i]); + for (int k = 0 ; k < g_stConfInfo.stThreads[i].numOfKey; k++) { + taosFprintfFile(g_fp, "%s:%s, ", g_stConfInfo.stThreads[i].key[k], g_stConfInfo.stThreads[i].value[k]); } taosFprintfFile(g_fp, "\n"); }