test(ci): 全局mock Celery任务,CI环境无Redis时避免连接超时
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 1m1s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1656h52m11s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1656h52m14s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1656h52m14s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 1656h52m16s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1657h23m43s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1657h23m45s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 1m1s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1656h52m11s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1656h52m14s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1656h52m14s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 1656h52m16s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 1657h23m43s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1657h23m45s
This commit is contained in:
+1
-2
@@ -22,8 +22,7 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
def _mock_celery_task():
|
||||
"""全局 mock Celery 任务的 delay/apply_async/send_task 方法。"""
|
||||
from celery import Task
|
||||
from celery import Celery
|
||||
from celery import Celery, Task
|
||||
|
||||
# 保存原始方法
|
||||
_orig_delay = Task.delay
|
||||
|
||||
Reference in New Issue
Block a user