@@ -115,6 +115,7 @@ def test_agent_with_session_manager(self, test_memory_stm):
115115
116116 assert agent ._session_manager == session_manager
117117
118+ @pytest .mark .flaky (reruns = 2 , reruns_delay = 5 )
118119 def test_conversation_persistence (self , test_memory_stm ):
119120 """Test that conversations are persisted to memory."""
120121 session_config = AgentCoreMemoryConfig (
@@ -135,6 +136,7 @@ def test_conversation_persistence(self, test_memory_stm):
135136 assert response2 is not None
136137 assert "John" in response2 .message ["content" ][0 ]["text" ]
137138
139+ @pytest .mark .flaky (reruns = 2 , reruns_delay = 5 )
138140 def test_session_manager_with_retrieval_config_adds_context (self , test_memory_ltm ):
139141 """Test session manager with custom retrieval configuration."""
140142 actor_id = f"test-actor-{ int (time .time ())} "
@@ -164,6 +166,7 @@ def test_session_manager_with_retrieval_config_adds_context(self, test_memory_lt
164166 assert "sushi" in str (agent .messages )
165167 assert "<user_context>" in str (agent .messages )
166168
169+ @pytest .mark .flaky (reruns = 2 , reruns_delay = 5 )
167170 def test_multiple_namespace_retrieval_config (self , test_memory_ltm ):
168171 """Test session manager with multiple namespace retrieval configurations."""
169172 actor_id = f"test-actor-{ int (time .time ())} "
@@ -301,6 +304,7 @@ def test_legacy_event_migration(self, test_memory_stm, memory_client):
301304
302305 # region End-to-end agent with batching tests
303306
307+ @pytest .mark .flaky (reruns = 2 , reruns_delay = 5 )
304308 def test_agent_conversation_with_context_manager (self , test_memory_stm ):
305309 """Test that Agent messages are flushed when the context manager exits, and session resume loads them."""
306310 session_id = f"test-agent-ctx-{ uuid .uuid4 ().hex [:8 ]} "
@@ -336,6 +340,7 @@ def test_agent_conversation_with_context_manager(self, test_memory_stm):
336340
337341 sm2 .close ()
338342
343+ @pytest .mark .flaky (reruns = 2 , reruns_delay = 5 )
339344 def test_agent_multi_turn_with_batching (self , test_memory_stm ):
340345 """Test that a multi-turn conversation within a single Agent works with batching."""
341346 session_id = f"test-agent-multi-{ uuid .uuid4 ().hex [:8 ]} "
0 commit comments