Skip to content

Commit 63f85dc

Browse files
Merge pull request #27 from zhaochenyang20/revert-25-ci/add_more_testcase
Revert "[WIP] ci: add more testcase"
2 parents 58a0184 + 8e278d7 commit 63f85dc

File tree

13 files changed

+213
-1659
lines changed

13 files changed

+213
-1659
lines changed

.github/workflows/pr-test.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

development.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ Run tests:
1010

1111
```bash
1212
pip install pytest
13-
# CPU-only tests (unit + fake e2e)
1413
pytest tests/unit -v
15-
16-
# Real E2E tests (GPU required, longer runtime)
17-
pytest tests/e2e/test_e2e_sglang.py -v -s
1814
```
1915

2016
## Benchmark Scripts

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ package-dir = { "" = "src" }
3333
where = ["src"]
3434

3535
[tool.pytest.ini_options]
36-
testpaths = ["tests/unit", "tests/e2e"]
36+
testpaths = ["tests/unit"]

src/sglang_diffusion_routing/cli/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
import argparse
7+
import asyncio
78
import sys
89

910
from sglang_diffusion_routing import DiffusionRouter
@@ -25,9 +26,18 @@ def _run_router_server(
2526
worker_urls if worker_urls is not None else args.worker_urls or []
2627
)
2728
router = DiffusionRouter(args, verbose=args.verbose)
29+
refresh_tasks = []
2830
for url in worker_urls:
2931
normalized_url = router.normalize_worker_url(url)
3032
router.register_worker(normalized_url)
33+
refresh_tasks.append(router.refresh_worker_video_support(normalized_url))
34+
35+
if refresh_tasks:
36+
37+
async def _refresh_all_worker_video_support() -> None:
38+
await asyncio.gather(*refresh_tasks)
39+
40+
asyncio.run(_refresh_all_worker_video_support())
3141

3242
print(f"{log_prefix} starting router on {args.host}:{args.port}", flush=True)
3343
print(

src/sglang_diffusion_routing/router/diffusion_router.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,6 @@ def _setup_routes(self) -> None:
6969
)
7070

7171
async def _start_background_health_check(self) -> None:
72-
# Probe video capability for pre-registered workers in the running event loop.
73-
unknown_workers = [
74-
url for url, support in self.worker_video_support.items() if support is None
75-
]
76-
if unknown_workers:
77-
await asyncio.gather(
78-
*(self.refresh_worker_video_support(url) for url in unknown_workers),
79-
return_exceptions=True,
80-
)
81-
8272
if self._health_task is None or self._health_task.done():
8373
self._health_task = asyncio.create_task(self._health_check_loop())
8474

@@ -393,12 +383,6 @@ async def generate(self, request: Request):
393383

394384
async def generate_video(self, request: Request):
395385
"""Route video generation to /v1/videos."""
396-
if not self.worker_request_counts:
397-
return JSONResponse(
398-
status_code=503,
399-
content={"error": "No workers registered in the pool"},
400-
)
401-
402386
candidate_workers = [
403387
worker_url
404388
for worker_url, support in self.worker_video_support.items()

tests/conftest.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/e2e/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)