Skip to content

Commit

Permalink
[opt](test)Add expected indices count check (apache#39024)
Browse files Browse the repository at this point in the history
Only when the expected_indices_count is 0, the tablet may not have the
index file.
  • Loading branch information
qidaye committed Aug 8, 2024
1 parent 0a3874f commit e0ffa38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion regression-test/plugins/plugin_curl_requester.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,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
Expand Down

0 comments on commit e0ffa38

Please sign in to comment.