From ebe222784a4e2e3bd6d0f62ca70e9d1a7bfe4d34 Mon Sep 17 00:00:00 2001 From: Hein Date: Fri, 18 Sep 2026 22:04:19 +0200 Subject: [PATCH] fix(tests): stop racing a live broker daemon against direct-SQL tests test-all/test-ci started the standalone pgsql-broker binary via broker-start before running the Go integration suite, leaving its background workers polling queue 1/2 against broker_test for the whole run. TestBrokerWorkflow already starts its own in-process broker and needs no external daemon, and nothing else in the suite uses it. The redundant daemon's worker could steal-claim a job that stage5_test.go's TestJobDependencies or TestFailedJobRetriesThenCompletesWithoutStranding had just inserted before the test's own broker_get call ran, intermittently failing those assertions. Drop broker-start/broker-stop from the test targets; the standalone targets remain for manual use. Co-Authored-By: Claude Sonnet 5 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 42b5226..b96df7c 100644 --- a/Makefile +++ b/Makefile @@ -70,9 +70,9 @@ test-local-unit: deps ## Run local unit tests @echo "Running local unit tests..." @$(GO) test -v -race -cover $(shell $(GO) list ./... | grep -v /tests/integration) -test-all: test-teardown test-setup test-connection schema-install broker-start test-local-unit test-integration-go broker-stop test-teardown ## Run all unit and integration tests (starts its own Postgres via docker-compose) +test-all: test-teardown test-setup test-connection schema-install test-local-unit test-integration-go test-teardown ## Run all unit and integration tests (starts its own Postgres via docker-compose) -test-ci: test-connection schema-install broker-start test-local-unit test-integration-go broker-stop ## Run all unit and integration tests against an externally-provided Postgres (CI services: block) +test-ci: test-connection schema-install test-local-unit test-integration-go ## Run all unit and integration tests against an externally-provided Postgres (CI services: block) test-connection: deps ## Test database connection with retry @echo "Testing database connection (host=$(TEST_DB_HOST) port=$(TEST_DB_PORT))..."