From 5927190e84842d8c68e695d1257f63fa27f58138 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Sun, 24 Apr 2022 20:37:21 +0800 Subject: [PATCH] [test: modify test case] --- tests/script/tsim/tmq/basic2Of2ConsOverlap.sim | 2 +- tests/test/c/tmqSim.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim b/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim index d04338aadd..878e3d9031 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 cf627fb5fb..774c9574f7 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"); } -- GitLab