Update test to use SetTitleCallbackProcessor instead of GithubV1CallbackProcessor

- Replace GithubV1CallbackProcessor with SetTitleCallbackProcessor in tests
- Remove unused github_v1_callback_processor.py file
- SetTitleCallbackProcessor is more appropriate for unit testing as it's part of the core codebase
- Tests still verify the same concurrency fix behavior
This commit is contained in:
openhands 2025-11-20 19:12:21 +00:00
parent b10f3b2cbb
commit f25160ad94
2 changed files with 3 additions and 42 deletions

View File

@ -1,36 +0,0 @@
import logging
from uuid import UUID
from openhands.app_server.event_callback.event_callback_models import (
EventCallback,
EventCallbackProcessor,
)
from openhands.app_server.event_callback.event_callback_result_models import (
EventCallbackResult,
EventCallbackResultStatus,
)
from openhands.sdk import Event
_logger = logging.getLogger(__name__)
class GithubV1CallbackProcessor(EventCallbackProcessor):
"""Callback processor for GitHub V1 integrations."""
async def __call__(
self,
conversation_id: UUID,
callback: EventCallback,
event: Event,
) -> EventCallbackResult | None:
"""Process events for GitHub V1 integration."""
_logger.info(f'GitHub V1 Callback {callback.id} invoked for event {event}')
# TODO: Implement GitHub integration logic here
# For now, just return success
return EventCallbackResult(
status=EventCallbackResultStatus.SUCCESS,
event_callback_id=callback.id,
event_id=event.id,
conversation_id=conversation_id,
)

View File

@ -11,9 +11,6 @@ from openhands.app_server.app_conversation.live_status_app_conversation_service
LiveStatusAppConversationService,
)
from openhands.app_server.event_callback.event_callback_models import EventCallback
from openhands.app_server.event_callback.github_v1_callback_processor import (
GithubV1CallbackProcessor,
)
from openhands.app_server.event_callback.set_title_callback_processor import (
SetTitleCallbackProcessor,
)
@ -66,9 +63,9 @@ class TestLiveStatusConcurrency:
access_token_hard_timeout=None,
)
# Create test processors (similar to what would be used in GitHub integration)
# Create test processors (multiple processors to test concurrency)
processors = [
GithubV1CallbackProcessor(),
SetTitleCallbackProcessor(),
SetTitleCallbackProcessor(),
]
@ -126,7 +123,7 @@ class TestLiveStatusConcurrency:
# Create test processors
processors = [
GithubV1CallbackProcessor(),
SetTitleCallbackProcessor(),
SetTitleCallbackProcessor(),
]