Skip to content

Commit

Permalink
[fix](test)Fix build index fault test (apache#38736)
Browse files Browse the repository at this point in the history
  • Loading branch information
qidaye committed Aug 2, 2024
1 parent d492056 commit b19cbb6
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,15 @@ suite("test_build_index_fault", "inverted_index"){
GetDebugPoint().enableDebugPointForAllBEs("fault_inject::BetaRowset::link_files_to::_link_inverted_index_file")
sql """ BUILD INDEX idx_title ON ${tableName}; """
state = wait_for_last_build_index_on_table_finish(tableName, timeout)
assertEquals("wait_timeout", state)
assertEquals("CANCELLED", state)
// check data
qt_count5 """ SELECT COUNT() from ${tableName}; """

// disable error_inject for BetaRowset link inverted index file and expect state is FINISHED
GetDebugPoint().disableDebugPointForAllBEs("fault_inject::BetaRowset::link_files_to::_link_inverted_index_file")
// timeout * 10 for possible fe schedule delay
state = wait_for_last_build_index_on_table_finish(tableName, timeout * 10)
// rebuild index
sql """ BUILD INDEX idx_title ON ${tableName}; """
state = wait_for_last_build_index_on_table_finish(tableName, timeout)
assertEquals("FINISHED", state)
// check data
qt_count6 """ SELECT COUNT() from ${tableName}; """
Expand All @@ -227,13 +228,14 @@ suite("test_build_index_fault", "inverted_index"){
GetDebugPoint().enableDebugPointForAllBEs("IndexBuilder::handle_single_rowset")
sql """ BUILD INDEX idx_url ON ${tableName}; """
state = wait_for_last_build_index_on_table_finish(tableName, timeout)
assertEquals("wait_timeout", state)
assertEquals("CANCELLED", state)
// check data
qt_count7 """ SELECT COUNT() from ${tableName}; """

GetDebugPoint().disableDebugPointForAllBEs("IndexBuilder::handle_single_rowset")
// timeout * 10 for possible fe schedule delay
state = wait_for_last_build_index_on_table_finish(tableName, timeout * 10)
// rebuild index
sql """ BUILD INDEX idx_url ON ${tableName}; """
state = wait_for_last_build_index_on_table_finish(tableName, timeout)
assertEquals("FINISHED", state)
// check data
qt_count8 """ SELECT COUNT() from ${tableName}; """
Expand Down

0 comments on commit b19cbb6

Please sign in to comment.