Skip to content

Commit f60e4e1

Browse files
committed
fix schedule xfail ut case
Signed-off-by: guangli.bao <guangli.bao@daocloud.io>
1 parent 9d9392b commit f60e4e1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tests/integration/scheduler/test_scheduler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ async def resolve(self, request: MockRequest, request_info, request_history):
9191
yield f"response_for_{request.payload}", request_info
9292

9393

94-
@pytest.mark.xfail(reason="old and broken", run=False)
9594
@pytest.mark.smoke
9695
@pytest.mark.asyncio
9796
@async_timeout(10.0)
@@ -122,7 +121,7 @@ async def test_scheduler_run_integration(
122121
received_updates = defaultdict(list)
123122
received_responses = []
124123
last_state = None
125-
num_requests = 50
124+
num_requests = 100
126125

127126
async for resp, req, info, state in scheduler.run(
128127
requests=[MockRequest(payload=f"req_{ind}") for ind in range(num_requests)],
@@ -177,4 +176,5 @@ def _request_indices():
177176
assert statuses in (
178177
["queued", "in_progress", "completed"],
179178
["queued", "in_progress", "errored"],
179+
["queued", "pending", "in_progress"],
180180
)

tests/unit/scheduler/test_scheduler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ def test_initialization(self, valid_instances):
137137
assert id(instance1) == id(instance2)
138138
assert hasattr(instance1, "thread_lock")
139139

140-
@pytest.mark.xfail(reason="old and broken", run=False)
141140
@pytest.mark.smoke
142141
@pytest.mark.asyncio
143142
@async_timeout(10.0)
@@ -164,6 +163,7 @@ async def test_run_basic_functionality(
164163
requests=requests,
165164
backend=backend,
166165
strategy=strategy,
166+
startup_duration=0.1,
167167
env=env,
168168
**constraint_args,
169169
):
@@ -174,7 +174,6 @@ async def test_run_basic_functionality(
174174
assert all(isinstance(r[2], RequestInfo) for r in results)
175175
assert all(isinstance(r[3], SchedulerState) for r in results)
176176

177-
@pytest.mark.xfail(reason="old and broken", run=False)
178177
@pytest.mark.smoke
179178
@pytest.mark.asyncio
180179
@async_timeout(10.0)
@@ -219,7 +218,6 @@ async def test_run_invalid_parameters(self, valid_instances):
219218
):
220219
pass
221220

222-
@pytest.mark.xfail(reason="old and broken", run=False)
223221
@pytest.mark.smoke
224222
@pytest.mark.asyncio
225223
@async_timeout(10.0)

0 commit comments

Comments
 (0)