fix: progress broadcasts now use correct WebSocket room names
- Fixed room name mismatch: ProgressService was broadcasting to 'download_progress' but JS clients join 'downloads' room - Added _get_room_for_progress_type() mapping function - Updated all progress methods to use correct room names - Added 13 new tests for room name mapping and broadcast verification - Updated existing tests to expect correct room names - Fixed JS clients to join valid rooms (downloads, queue, scan)
This commit is contained in:
@@ -180,9 +180,9 @@ class TestDownloadProgressIntegration:
|
||||
connection_id = "test_client_1"
|
||||
await websocket_service.connect(mock_ws, connection_id)
|
||||
|
||||
# Join the queue_progress room to receive queue updates
|
||||
# Join the queue room to receive queue updates
|
||||
await websocket_service.manager.join_room(
|
||||
connection_id, "queue_progress"
|
||||
connection_id, "queue"
|
||||
)
|
||||
|
||||
# Subscribe to progress events and forward to WebSocket
|
||||
@@ -254,12 +254,12 @@ class TestDownloadProgressIntegration:
|
||||
await websocket_service.connect(client1, "client1")
|
||||
await websocket_service.connect(client2, "client2")
|
||||
|
||||
# Join both clients to the queue_progress room
|
||||
# Join both clients to the queue room
|
||||
await websocket_service.manager.join_room(
|
||||
"client1", "queue_progress"
|
||||
"client1", "queue"
|
||||
)
|
||||
await websocket_service.manager.join_room(
|
||||
"client2", "queue_progress"
|
||||
"client2", "queue"
|
||||
)
|
||||
|
||||
# Subscribe to progress events and forward to WebSocket
|
||||
|
||||
Reference in New Issue
Block a user