From 88f605d5e6c1e195777a1527037dc952dde20f07 Mon Sep 17 00:00:00 2001 From: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 09:01:32 +0000 Subject: [PATCH] test(#3515): increase unit test timeout to 30s TestFilteringWithMixedRules in the conftest evaluator unit tests was panicking with a test timeout under CI load. The test performs I/O-heavy work (building tar.gz archives, compiling Rego policies via NewConftestEvaluatorWithNamespace) that occasionally exceeds the 10s budget, causing flaky failures such as those seen on PR #3295 (workflow runs 30586521570 and 30907557496). The failures are reproducibly transient: the same commit passes on re-run. Raise the -timeout flag for the unit test target in the Makefile from 10s to 30s so that inherently variable-latency operations (OPA policy compilation) have adequate headroom on shared CI runners. This matches the existing generative-test timeout and mirrors the alternative suggested by triage. Update AGENTS.md so the documented test-tag timeout table stays in sync with the Makefile. Note: pre-commit hooks were not run. The conforma/hooks pre-commit repo could not be fetched in the sandbox (git fetch returned HTTP 403); the sole configured hook (check-commit-message) validates commit messages rather than source files and does not apply to the Makefile/AGENTS.md diff. Closes #3515 --- AGENTS.md | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 650d3c033..4878ffe1d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,7 +34,7 @@ and `hack/macos/TROUBLESHOOTING.md` for detailed debugging. ### Test Tags Tests use build tags with different timeouts: -- `unit` (10s), `integration` (15s), `generative` (30s), `acceptance` (20m) +- `unit` (30s), `integration` (15s), `generative` (30s), `acceptance` (20m) - Run specific: `go test -tags=unit ./internal/evaluator -run TestName` ## Key Conventions diff --git a/Makefile b/Makefile index 96209218d..3ff872765 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,7 @@ TEST_OUTPUT_FILTER=grep -vE '0.0% of statements|\[no test files\]' .PHONY: test test: ## Run all unit tests @echo "Unit tests:" - @set -o pipefail && go test -race -covermode=atomic -coverprofile=coverage-unit.out -timeout 10s -tags=unit ./... | $(TEST_OUTPUT_FILTER) + @set -o pipefail && go test -race -covermode=atomic -coverprofile=coverage-unit.out -timeout 30s -tags=unit ./... | $(TEST_OUTPUT_FILTER) @echo "Integration tests:" @set -o pipefail && go test -race -covermode=atomic -coverprofile=coverage-integration.out -timeout 15s -tags=integration ./... | $(TEST_OUTPUT_FILTER) # Given the nature of generative tests the test timeout is increased from 500ms