diff --git a/tests/conftest.py b/tests/conftest.py index 7e77fdd7d4..4b5e382442 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -538,12 +538,8 @@ def collect_logs(): query="?logType=2") allure.attach(body=json.dumps(resp.json(), indent=4), name="all_device_reboot_logs\n", attachment_type=allure.attachment_type.JSON) - try: - pytest.fail("AP crashed during the test") - logging.info("AP crashed during the test") - except Exception as e: - logging.info("In the crash exception:- " + str(e)) - pytest.exit(1) + logging.info("AP crashed during the test") + pytest.exit("AP crashed during the test", 2) else: logging.info("resp.status_code:- " + str(resp.status_code))