diff --git a/test/integ_tests/job_test_script.py b/test/integ_tests/job_test_script.py index 8bc3b92cd..95b890d60 100644 --- a/test/integ_tests/job_test_script.py +++ b/test/integ_tests/job_test_script.py @@ -33,7 +33,7 @@ def start_here(): def failed_job_script(): print("Test job started!!!!!") - assert 0 + open("fake_file") def completed_job_script(): diff --git a/test/integ_tests/test_create_quantum_job.py b/test/integ_tests/test_create_quantum_job.py index 640cb1688..122fd8a69 100644 --- a/test/integ_tests/test_create_quantum_job.py +++ b/test/integ_tests/test_create_quantum_job.py @@ -77,7 +77,7 @@ def test_failed_quantum_job(aws_session, capsys): "braket_container.py", "Running Code As Process", "Test job started!!!!!", - "AssertionError", + "FileNotFoundError: [Errno 2] No such file or directory: 'fake_file'", "Code Run Finished", '"user_entry_point": "braket_container.py"', ] @@ -85,8 +85,9 @@ def test_failed_quantum_job(aws_session, capsys): for data in logs_to_validate: assert data in log_data - assert job.metadata()["failureReason"].startswith( - "AlgorithmError: Job at job_test_script:start_here" + assert job.metadata()["failureReason"] == ( + "AlgorithmError: FileNotFoundError: [Errno 2] " + "No such file or directory: 'fake_file', exit code: 1" )