Skip to content

chore(test): trim redundant large-org case from web digest concurrency tests#66372

Draft
gantoine wants to merge 1 commit into
masterfrom
claude/test-cleanup-web-analytics-digest-concurrency
Draft

chore(test): trim redundant large-org case from web digest concurrency tests#66372
gantoine wants to merge 1 commit into
masterfrom
claude/test-cleanup-web-analytics-digest-concurrency

Conversation

@gantoine

Copy link
Copy Markdown
Member

Problem

The two web-analytics digest concurrency tests (test_wa_weekly_digest_respects_concurrency_cap and test_respects_concurrency_cap) were each parameterized over a small and a large org count. The large case (500/200 orgs, cap 8) spins a Temporal Worker with hundreds of concurrent activities but exercises the exact same code path as the small case.

Changes

  • Drop the large-org parametrize case from both tests, keeping (org_count=50, batch_size=5, max_concurrent=4).

The semaphore fan-out guard the test asserts (tracker.max_in_flight <= max_concurrent) is independent of org count once the number of batches exceeds the cap. The small case already schedules 10 batches against a cap of 4, so it drives max_in_flight past the cap and fully catches a missing/broken semaphore. The large case adds wall-time, not signal.

How did you test this code?

I'm an agent. Ran locally:

hogli test products/web_analytics/backend/test/test_weekly_digest_workflows.py products/web_analytics/backend/test/test_digest_notification_workflows.py

Result: 13 passed.

🤖 Agent context

Autonomy: Fully autonomous

Part of a monorepo test-suite cleanup targeting high CI-wall-time tests. Adversarial check before trimming: the dropped case can only differ from the kept case if the cap logic depends on absolute org count, which it does not — both cross the cap threshold, so the regression caught is identical. Tool: Claude Code (Opus 4.8).

Requesting review from: Web analytics

…y tests

Both concurrency-cap tests were parameterized over a small and a large org
count. The small case (50 orgs, batch 5, cap 4) already schedules 10 batches
against a cap of 4, so it fully exercises the semaphore fan-out guard the test
asserts. The large case (500/200 orgs, cap 8) tests the identical code path —
the cap is independent of org count once batches exceed it — but spins a Worker
with hundreds of concurrent activities for no extra signal. Keep the small case.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(test): trim redundant large-org ca..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant