Skip to content

Commit e304b89

Browse files
committed
Fix tests
1 parent c9c84bc commit e304b89

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

src/tests/_internal/server/background/tasks/test_process_submitted_jobs.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -737,43 +737,6 @@ async def test_assigns_no_fleet_when_all_fleets_occupied(self, test_db, session:
737737
assert job.instance_id is None
738738
assert job.fleet_id is None
739739

740-
@pytest.mark.asyncio
741-
@pytest.mark.parametrize("test_db", ["sqlite", "postgres"], indirect=True)
742-
async def test_fails_with_no_capacity_when_specified_fleets_occupied(
743-
self, test_db, session: AsyncSession
744-
):
745-
project = await create_project(session)
746-
user = await create_user(session)
747-
repo = await create_repo(session=session, project_id=project.id)
748-
fleet = await create_fleet(session=session, project=project, name="test-fleet")
749-
instance = await create_instance(
750-
session=session,
751-
project=project,
752-
fleet=fleet,
753-
instance_num=0,
754-
status=InstanceStatus.BUSY,
755-
)
756-
fleet.instances.append(instance)
757-
run_spec = get_run_spec(repo_id=repo.name)
758-
run_spec.configuration.fleets = ["test-fleet"]
759-
run = await create_run(
760-
session=session,
761-
project=project,
762-
repo=repo,
763-
user=user,
764-
run_spec=run_spec,
765-
)
766-
job = await create_job(
767-
session=session,
768-
run=run,
769-
instance_assigned=False,
770-
)
771-
await session.commit()
772-
await process_submitted_jobs()
773-
await session.refresh(job)
774-
assert job.status == JobStatus.TERMINATING
775-
assert job.termination_reason == JobTerminationReason.FAILED_TO_START_DUE_TO_NO_CAPACITY
776-
777740
@pytest.mark.asyncio
778741
@pytest.mark.parametrize("test_db", ["sqlite", "postgres"], indirect=True)
779742
async def test_does_not_assign_job_to_elastic_empty_fleet_if_fleets_unspecified(

0 commit comments

Comments
 (0)