diff --git a/bindings/python/tests/fdbcli_tests.py b/bindings/python/tests/fdbcli_tests.py index 49fd45c632..d18ef9f6d8 100755 --- a/bindings/python/tests/fdbcli_tests.py +++ b/bindings/python/tests/fdbcli_tests.py @@ -381,12 +381,19 @@ def exclude(logger): while True: logger.debug("Excluding process: {}".format(excluded_address)) error_message = run_fdbcli_command_and_get_error('exclude', excluded_address) - if not error_message: + if error_message == 'WARNING: {} is a coordinator!'.format(excluded_address): + # exclude coordinator will fail, verify the randomly selected process is the coordinator + coordinator_list = get_value_from_status_json(True, 'client', 'coordinators', 'coordinators') + assert len(coordinator_list) == 1 + assert coordinator_list[0]['address'] == excluded_address break + elif not error_message: + break + else: + logger.debug("Error message: {}\n".format(error_message)) logger.debug("Retry exclude after 1 second") time.sleep(1) output2 = run_fdbcli_command('exclude') - # logger.debug(output3) assert 'There are currently 1 servers or localities being excluded from the database' in output2 assert excluded_address in output2 run_fdbcli_command('include', excluded_address) @@ -416,6 +423,6 @@ if __name__ == '__main__': else: assert process_number > 1, "Process number should be positive" coordinators() - # exclude() + exclude()