@@ -875,6 +875,7 @@ class TestStatus(enum.Enum):
875875 UNKNOWN = "UNKNOWN"
876876 OK = "OK"
877877 SKIPPED = "SKIPPED"
878+ NOT_FAILED = "NOT_FAILED"
878879
879880
880881class FailureReason (enum .Enum ):
@@ -917,6 +918,10 @@ class FailureReason(enum.Enum):
917918 # UNKNOWN reasons
918919 NO_REFERENCE = "no reference file"
919920 INTERNAL_ERROR = "Test internal error: "
921+ NOT_FAILED = (
922+ "The test succeeded, but it is listed in parallel_replicas_blacklist.txt or async_insert_blacklist.txt. "
923+ "Please remove it from the list"
924+ )
920925
921926
922927def threshold_generator (always_on_prob , always_off_prob , min_val , max_val ):
@@ -1543,7 +1548,7 @@ class TestCase:
15431548
15441549 return None
15451550
1546- def process_result_impl (self , proc , total_time : float ):
1551+ def process_result_impl (self , proc , total_time : float ) -> TestResult :
15471552 kill_output = ""
15481553 if proc :
15491554 if proc .returncode is None :
@@ -2050,6 +2055,13 @@ class TestCase:
20502055 if result .status == TestStatus .FAIL :
20512056 result .description = self .add_info_about_settings (result .description )
20522057
2058+ if self .name in suite .blacklist_check :
2059+ if result .status == TestStatus .OK :
2060+ result .status = TestStatus .NOT_FAILED
2061+ result .reason = FailureReason .NOT_FAILED
2062+ if result .status == TestStatus .FAIL :
2063+ result .status = TestStatus .SKIPPED
2064+
20532065 self ._cleanup (result .status == TestStatus .OK )
20542066
20552067 return result
@@ -2328,6 +2340,10 @@ class TestSuite:
23282340 self .skip_list : List [str ] = []
23292341 self .cloud_skip_list : List [str ] = []
23302342 self .private_skip_list : List [str ] = []
2343+ # List of tests included in a blacklist.
2344+ # They will be run, and if they succeed, the status will be changed to FAIL to notify
2345+ # that the changes in PR fixes this test.
2346+ self .blacklist_check : List [str ] = []
23312347
23322348 if args .run_by_hash_num is not None and args .run_by_hash_total is not None :
23332349 if args .run_by_hash_num > args .run_by_hash_total :
@@ -2523,12 +2539,18 @@ def run_tests_array(
25232539 + colored (" SKIPPED " , args , "cyan" , attrs = ["bold" ])
25242540 + CL_SQUARE_BRACKET
25252541 )
2542+ MSG_NOT_FAILED = (
2543+ OP_SQUARE_BRACKET
2544+ + colored (" NOT_FAILED " , args , "red" , attrs = ["bold" ])
2545+ + CL_SQUARE_BRACKET
2546+ )
25262547
25272548 MESSAGES = {
25282549 TestStatus .FAIL : MSG_FAIL ,
25292550 TestStatus .UNKNOWN : MSG_UNKNOWN ,
25302551 TestStatus .OK : MSG_OK ,
25312552 TestStatus .SKIPPED : MSG_SKIPPED ,
2553+ TestStatus .NOT_FAILED : MSG_NOT_FAILED ,
25322554 }
25332555
25342556 passed_total = 0
@@ -3294,12 +3316,13 @@ def main(args):
32943316 cloud_skip_list = try_get_skip_list (base_dir , "../queries-no-cloud-tests.txt" )
32953317 private_skip_list = try_get_skip_list (base_dir , "../queries-no-private-tests.txt" )
32963318 skip_list = []
3319+ blacklist_check = []
3320+
3321+ blacklist_check .extend (try_get_skip_list (base_dir , "../analyzer_tech_debt.txt" ))
32973322
32983323 if args .no_parallel_replicas is True :
3299- skip_list_parallel_replicas = try_get_skip_list (
3300- base_dir , "../parallel_replicas_blacklist.txt"
3301- )
3302- skip_list .extend (skip_list_parallel_replicas )
3324+ blacklist = try_get_skip_list (base_dir , "../parallel_replicas_blacklist.txt" )
3325+ blacklist_check .extend (blacklist )
33033326
33043327 for suite in sorted (os .listdir (base_dir ), key = suite_key_func ):
33053328 if server_died .is_set ():
@@ -3312,6 +3335,7 @@ def main(args):
33123335 test_suite .skip_list = skip_list
33133336 test_suite .cloud_skip_list = cloud_skip_list
33143337 test_suite .private_skip_list = private_skip_list
3338+ test_suite .blacklist_check = blacklist_check
33153339 total_tests_run += do_run_tests (
33163340 args .jobs , test_suite , args , exit_code , restarted_tests , server_died
33173341 )
0 commit comments