Merge pull request #5246 from sfc-gh-clin/fix-exclude-test

Fix exclude test and re-enable it in ctest
This commit is contained in:
Andrew Noyes 2021-07-21 15:35:36 -07:00 committed by GitHub
commit 37a0361617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -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 print the warning, 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()