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 <noreply@anthropic.com>
This commit is contained in:
@@ -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))..."
|
||||
|
||||
Reference in New Issue
Block a user