test(integration): backport the team delete warmup fix from #47135 to rc/1.108.0

Takes only the max_workers change in test_team_delete_large_membership.py from 7e8be61fa0. The 16-thread key warmup slowed the /team/delete that follows it to 5.4-11.6s locally against the client's 15s timeout, and 2 threads brings it to 4.1-5.4s
This commit is contained in:
Yuneng Jiang 2026-10-31 18:02:12 -07:00
parent f86f570aca
commit 13218620ed
No known key found for this signature in database

View file

@ -727,7 +727,7 @@ def _models_status(proxy: Gateway, key: str) -> int:
def _statuses(proxy: Gateway, keys: Sequence[str]) -> dict[int, int]:
with ThreadPoolExecutor(max_workers=16) as pool:
with ThreadPoolExecutor(max_workers=2) as pool:
statuses: Final = tuple(pool.map(lambda key: _models_status(proxy, key), keys))
return {status: statuses.count(status) for status in frozenset(statuses)}