Do not treat database deletion errors as Feature test failures.

This commit is contained in:
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

View File

@ -561,9 +561,6 @@ def execute_test(test_module_list_passed, server_passed, driver_passed,
if connection: if connection:
test_utils.drop_database(connection, test_db_name) test_utils.drop_database(connection, test_db_name)
connection.close() connection.close()
# Delete test server
# test_utils.delete_test_server(test_client)
test_utils.delete_server(test_client, server_information)
except Exception as exc: except Exception as exc:
traceback.print_exc(file=sys.stderr) traceback.print_exc(file=sys.stderr)
print(str(exc)) 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().ident,
threading.current_thread().name)) threading.current_thread().name))
# Mark failure as true # 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 global failure
failure = True failure = True
finally: finally:
# Delete test server
test_utils.delete_server(test_client, server_information)
# Delete web-driver instance # Delete web-driver instance
thread_name = "parallel_tests" + server_passed['name'] thread_name = "parallel_tests" + server_passed['name']
if threading.current_thread().name == thread_name: if threading.current_thread().name == thread_name: