Do not treat database deletion errors as Feature test failures.

pull/6114/head
Yogesh Mahajan 2023-04-17 11:47:08 +05:30 committed by GitHub
parent 947630e0f0
commit 686f52f636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -561,9 +561,6 @@ def execute_test(test_module_list_passed, server_passed, driver_passed,
if connection:
test_utils.drop_database(connection, test_db_name)
connection.close()
# Delete test server
# test_utils.delete_test_server(test_client)
test_utils.delete_server(test_client, server_information)
except Exception as exc:
traceback.print_exc(file=sys.stderr)
print(str(exc))
@ -571,10 +568,12 @@ def execute_test(test_module_list_passed, server_passed, driver_passed,
threading.current_thread().ident,
threading.current_thread().name))
# Mark failure as true
if 'is being accessed by other users' not in str(exec):
if str(exc).find('other sessions using the database.') != -1:
global failure
failure = True
finally:
# Delete test server
test_utils.delete_server(test_client, server_information)
# Delete web-driver instance
thread_name = "parallel_tests" + server_passed['name']
if threading.current_thread().name == thread_name: