From 4f08995b3125a0c40e1a9d690d08a2415a4966d9 Mon Sep 17 00:00:00 2001 From: qiye Date: Wed, 7 Aug 2024 21:51:57 +0800 Subject: [PATCH] [opt](test)Add expected indices count check (#39024) Only when the expected_indices_count is 0, the tablet may not have the index file. --- regression-test/plugins/plugin_curl_requester.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/regression-test/plugins/plugin_curl_requester.groovy b/regression-test/plugins/plugin_curl_requester.groovy index 1e097a045a76d5..f78ff21a79e3b2 100644 --- a/regression-test/plugins/plugin_curl_requester.groovy +++ b/regression-test/plugins/plugin_curl_requester.groovy @@ -255,7 +255,8 @@ logger.info("Added 'be_report_task' function to Suite") Suite.metaClass.check_nested_index_file = { ip, port, tablet_id, expected_rowsets_count, expected_indices_count, format -> def (code, out, err) = http_client("GET", String.format("http://%s:%s/api/show_nested_index_file?tablet_id=%s", ip, port, tablet_id)) logger.info("Run show_nested_index_file_on_tablet: code=" + code + ", out=" + out + ", err=" + err) - if (code == 500) { + // only when the expected_indices_count is 0, the tablet may not have the index file. + if (code == 500 && expected_indices_count == 0) { assertEquals("E-6003", parseJson(out.trim()).status) assertTrue(parseJson(out.trim()).msg.contains("not found")) return