Skip to content

Commit 704ddae

Browse files
Copilotlarohra
andcommitted
Remove test for logging change per review feedback
Co-authored-by: larohra <[email protected]>
1 parent 5a15ff7 commit 704ddae

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

python/packages/azurefunctions/tests/test_orchestration.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -350,38 +350,6 @@ def test_run_without_thread(self) -> None:
350350
# Should be called twice: once for session_key, once for correlationId
351351
assert mock_context.new_uuid.call_count == 2
352352

353-
def test_run_without_thread_logs_debug(self, caplog: pytest.LogCaptureFixture) -> None:
354-
"""Test that run() without thread logs at DEBUG level, not WARNING."""
355-
import logging
356-
357-
mock_context = Mock()
358-
mock_context.instance_id = "test-instance-log"
359-
mock_context.new_uuid = Mock(side_effect=["test-guid", "correlation-guid"])
360-
361-
entity_task = _create_entity_task()
362-
mock_context.call_entity = Mock(return_value=entity_task)
363-
364-
agent = DurableAIAgent(mock_context, "TestAgent")
365-
366-
# Capture logs at DEBUG level
367-
with caplog.at_level(logging.DEBUG):
368-
# Call without thread
369-
agent.run(messages="Test message")
370-
371-
# Verify that a DEBUG log was created about the session_id
372-
debug_logs = [record for record in caplog.records if record.levelname == "DEBUG"]
373-
session_id_logs = [
374-
log for log in debug_logs if "No thread provided, created unique session_id" in log.getMessage()
375-
]
376-
assert len(session_id_logs) == 1, "Expected exactly one DEBUG log about session_id creation"
377-
378-
# Verify that NO WARNING log was created
379-
warning_logs = [record for record in caplog.records if record.levelname == "WARNING"]
380-
session_warning_logs = [
381-
log for log in warning_logs if "No thread provided, created unique session_id" in log.getMessage()
382-
]
383-
assert len(session_warning_logs) == 0, "Should not log a WARNING when thread is not provided"
384-
385353
def test_run_with_response_format(self) -> None:
386354
"""Test that run() passes response format correctly."""
387355
mock_context = Mock()

0 commit comments

Comments
 (0)