Skip to content

Commit 5b329a6

Browse files
committed
ci,e2e: better error messages
1 parent 751f1cb commit 5b329a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/e2e/tests/steps/stub.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,17 @@ def ue_start_and_attach(
194194

195195
@contextmanager
196196
def _handle_start_error(name: str) -> Generator[None, None, None]:
197+
raise_failed = False
197198
try:
198199
yield
199200
logging.info("%s started", name)
200201
except grpc.RpcError as err:
201202
if ErrorReportedByAgent(err).code is grpc.StatusCode.ABORTED:
202-
pytest.fail(f"{name} failed to start")
203+
raise_failed = True
203204
else:
204205
raise err from None
206+
if raise_failed:
207+
pytest.fail(f"{name} failed to start")
205208

206209

207210
def _log_attached_ue(future: grpc.Future, ue_stub: UEStub):

0 commit comments

Comments
 (0)