Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion webhook_server/libs/test_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ async def call_test_oracle(
msg = f"Test Oracle server at {server_url} is not responding{status_info}, skipping test analysis"
github_webhook.logger.warning(f"{log_prefix} {msg}")
try:
await asyncio.to_thread(pull_request.create_issue_comment, msg)
await asyncio.to_thread(
pull_request.create_issue_comment,
f"Test Oracle server is not responding{status_info}, skipping test analysis",
)
except Exception:
github_webhook.logger.exception(f"{log_prefix} Failed to post health check comment")
return
Expand Down
3 changes: 1 addition & 2 deletions webhook_server/tests/test_test_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ async def test_health_check_non_200_posts_comment(self, mock_github_webhook: Moc
mock_to_thread.assert_called_once()
call_args = mock_to_thread.call_args
assert call_args[0][0] == mock_pull_request.create_issue_comment
assert "not responding" in call_args[0][1]
assert "(status 503)" in call_args[0][1]
assert call_args[0][1] == "Test Oracle server is not responding (status 503), skipping test analysis"

@pytest.mark.asyncio
async def test_successful_analyze_call(self, mock_github_webhook: Mock, mock_pull_request: Mock) -> None:
Expand Down