mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-06 08:49:53 -06:00
Debug: Priority Tests (#1548)
* debug: prio tests * debug: try running against staging * Revert "debug: try running against staging" This reverts commit de7fcc922b731f2c10497eabd746f90971cdfa5b. * fix: turn down concurrency run number
This commit is contained in:
@@ -71,7 +71,7 @@ async def test_multi_concurrency_key(hatchet: Hatchet) -> None:
|
||||
},
|
||||
),
|
||||
)
|
||||
for _ in range(200)
|
||||
for _ in range(100)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ async def test_workflow_level_concurrency(hatchet: Hatchet) -> None:
|
||||
},
|
||||
),
|
||||
)
|
||||
for _ in range(200)
|
||||
for _ in range(100)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -51,11 +51,11 @@ async def dummy_runs() -> None:
|
||||
},
|
||||
)
|
||||
)
|
||||
for ix in range(60)
|
||||
for ix in range(40)
|
||||
]
|
||||
)
|
||||
|
||||
await asyncio.sleep(5)
|
||||
await asyncio.sleep(3)
|
||||
|
||||
return None
|
||||
|
||||
@@ -64,6 +64,7 @@ async def dummy_runs() -> None:
|
||||
async def test_priority(hatchet: Hatchet, dummy_runs: None) -> None:
|
||||
test_run_id = str(uuid4())
|
||||
choices: list[Priority] = ["low", "medium", "high", "default"]
|
||||
N = 30
|
||||
|
||||
run_refs = await priority_workflow.aio_run_many_no_wait(
|
||||
[
|
||||
@@ -77,7 +78,7 @@ async def test_priority(hatchet: Hatchet, dummy_runs: None) -> None:
|
||||
},
|
||||
)
|
||||
)
|
||||
for ix in range(30)
|
||||
for ix in range(N)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -116,6 +117,7 @@ async def test_priority(hatchet: Hatchet, dummy_runs: None) -> None:
|
||||
)
|
||||
|
||||
assert len(runs_ids_started_ats) == len(run_refs)
|
||||
assert len(runs_ids_started_ats) == N
|
||||
|
||||
for i in range(len(runs_ids_started_ats) - 1):
|
||||
curr = runs_ids_started_ats[i]
|
||||
@@ -136,7 +138,7 @@ async def test_priority(hatchet: Hatchet, dummy_runs: None) -> None:
|
||||
async def test_priority_via_scheduling(hatchet: Hatchet, dummy_runs: None) -> None:
|
||||
test_run_id = str(uuid4())
|
||||
sleep_time = 3
|
||||
n = 100
|
||||
n = 30
|
||||
choices: list[Priority] = ["low", "medium", "high", "default"]
|
||||
run_at = datetime.now() + timedelta(seconds=sleep_time)
|
||||
|
||||
@@ -223,7 +225,7 @@ async def crons(
|
||||
) -> AsyncGenerator[tuple[str, str, int], None]:
|
||||
test_run_id = str(uuid4())
|
||||
choices: list[Priority] = ["low", "medium", "high"]
|
||||
n = 100
|
||||
n = 30
|
||||
|
||||
crons = await asyncio.gather(
|
||||
*[
|
||||
|
||||
Reference in New Issue
Block a user