@@ -406,7 +406,8 @@ def test_session_created_spans_only(self, live_servers):
406406 main_port , otlp_http_port , mgr = live_servers
407407 session_name = "e2e-agentcore"
408408 with _agentcore_server (otlp_http_port , session_name , extra_env = _AGENTCORE_ENV ):
409- httpx .post (f"http://127.0.0.1:{ _AGENTCORE_PORT } /invocations" , json = {"prompt" : "Roll a 20-sided die" }, timeout = 60 )
409+ r = httpx .post (f"http://127.0.0.1:{ _AGENTCORE_PORT } /invocations" , json = {"prompt" : "Roll a 20-sided die" }, timeout = 60 )
410+ assert r .status_code == 200
410411 wait_for_session_complete_sync (mgr , session_name , timeout = 60 )
411412 s = mgr .sessions [session_name ]
412413 assert s .is_complete and s .source == "otlp" and len (s .spans ) > 0
@@ -415,15 +416,17 @@ def test_invocations_extracted(self, live_servers):
415416 main_port , otlp_http_port , mgr = live_servers
416417 session_name = "e2e-agentcore-inv"
417418 with _agentcore_server (otlp_http_port , session_name , extra_env = _AGENTCORE_ENV ):
418- httpx .post (f"http://127.0.0.1:{ _AGENTCORE_PORT } /invocations" , json = {"prompt" : "Is 17 prime?" }, timeout = 60 )
419+ r = httpx .post (f"http://127.0.0.1:{ _AGENTCORE_PORT } /invocations" , json = {"prompt" : "Is 17 prime?" }, timeout = 60 )
420+ assert r .status_code == 200
419421 wait_for_session_complete_sync (mgr , session_name , timeout = 60 )
420422 assert len (mgr .sessions [session_name ].invocations ) > 0
421423
422424 def test_session_visible_via_api (self , live_servers ):
423425 main_port , otlp_http_port , mgr = live_servers
424426 session_name = "e2e-agentcore-api"
425427 with _agentcore_server (otlp_http_port , session_name , extra_env = _AGENTCORE_ENV ):
426- httpx .post (f"http://127.0.0.1:{ _AGENTCORE_PORT } /invocations" , json = {"prompt" : "Hello!" }, timeout = 60 )
428+ r = httpx .post (f"http://127.0.0.1:{ _AGENTCORE_PORT } /invocations" , json = {"prompt" : "Hello!" }, timeout = 60 )
429+ assert r .status_code == 200
427430 wait_for_session_complete_sync (mgr , session_name , timeout = 60 )
428431 data = httpx .get (f"http://127.0.0.1:{ main_port } /api/streaming/sessions" ).json ()["data" ]
429432 assert session_name in [s ["sessionId" ] for s in data ]
0 commit comments