diff --git a/tests/tests_integration/test_file_integration.py b/tests/tests_integration/test_file_integration.py index c99b2bda..704cc1cb 100644 --- a/tests/tests_integration/test_file_integration.py +++ b/tests/tests_integration/test_file_integration.py @@ -99,18 +99,19 @@ def load_file_from_path() -> BinaryIO: read_file=load_file_from_path, ) - queue.upload() - - time.sleep(5) - - failure_logger = queue.get_failure_logger() - print(f"Failure logs: {failure_logger.failure_logs}") - print(f"Check for file: {os.path.isfile(qualified_failure_logging_path)}") - - assert len(failure_logger) == 1 - assert FILE_REASON_MAP_KEY in failure_logger - assert NO_PERMISSION_FILE in failure_logger[FILE_REASON_MAP_KEY] - assert ERROR_RAISED_ON_FILE_READ in failure_logger[FILE_REASON_MAP_KEY][NO_PERMISSION_FILE] + try: + queue.upload() + + time.sleep(5) + except Exception as e: + failure_logger = queue.get_failure_logger() + print(f"Failure logs: {failure_logger.failure_logs}") + print(f"Check for file: {os.path.isfile(qualified_failure_logging_path)}") + + assert len(failure_logger) == 1 + assert FILE_REASON_MAP_KEY in failure_logger + assert NO_PERMISSION_FILE in failure_logger[FILE_REASON_MAP_KEY] + assert ERROR_RAISED_ON_FILE_READ in failure_logger[FILE_REASON_MAP_KEY][NO_PERMISSION_FILE] @pytest.mark.parametrize("functions_runtime", ["true", "false"])