Skip to content

test(jq): give depth limit test runs an explicit deadline - #884

Merged
ewhauser merged 1 commit into
mainfrom
test/jq-depth-deadline
Oct 20, 2026
Merged

ewhauser merged 1 commit into
mainfrom
test/jq-depth-deadline

Conversation

@ewhauser

Copy link
Copy Markdown
Owner

TestJQRejectsValuesNestedBeyondDepthLimit started failing on main and on open PRs: under -race each subtest takes ~9s to build its 3,000,000-level value, and with 15 subtests in parallel on CI runners they hit jq's 60s default evaluation limit (added in #873) before the depth error, e.g. jq: evaluation exceeded the 1m0s time limit.

The default only applies when the request context has no deadline, so the test now passes a 10-minute deadline. The depth values and assertions are unchanged.

Verified: go test -race -count=1 -run TestJQRejectsValuesNestedBeyondDepthLimit ./contrib/jq passes (14.6s locally).

Each subtest builds a 3,000,000-level value, which takes about 9s under the race detector, and all 15 run in parallel. On CI runners they hit jq's 60s default evaluation limit before the depth check, failing main and open PRs. An explicit 10m request deadline replaces that default.
@ewhauser
ewhauser enabled auto-merge (squash) October 20, 2026 04:50
@ewhauser
ewhauser merged commit 9e907b9 into main Oct 20, 2026
17 checks passed
@ewhauser
ewhauser deleted the test/jq-depth-deadline branch October 20, 2026 04:59
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