Skip to content

test: optimize healthchecks and force image rebuild#6234

Merged
gustavosbarreto merged 1 commit intomasterfrom
fix/test-infrastructure-improvements
Apr 24, 2026
Merged

test: optimize healthchecks and force image rebuild#6234
gustavosbarreto merged 1 commit intomasterfrom
fix/test-infrastructure-improvements

Conversation

@gustavosbarreto
Copy link
Copy Markdown
Member

  • Optimize Postgres healthcheck: 115s → 30s max wait time
  • Optimize MongoDB healthcheck interval: 30s → 5s
  • Add pull_policy: build to force image rebuild with current migrations
  • Add restart: on-failure:3 for automatic recovery from transient failures
  • Fix cleanup: move compose.Down() to defer to ensure container cleanup on test failure

@gustavosbarreto gustavosbarreto requested a review from a team as a code owner April 24, 2026 14:54
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

Claude finished @gustavosbarreto's task in 3m 24s —— View job


Code Review Complete

Reviewed 4 files across code quality, security, testing, language patterns, and architecture — no issues found. The code looks good as-is.

The changes are well-structured:

  • Healthcheck tuning (mongo/postgres) correctly reduces wait times with appropriate retry/interval/timeout values
  • pull_policy: build ensures fresh image builds with current migrations (valid in Compose Spec; version: "3.7" is ignored by modern docker compose v2)
  • restart: on-failure:3 provides sensible resilience for transient startup failures without undermining test integrity (healthchecks still gate readiness)
  • defer compose.Down() is the correct Go idiom — guarantees cleanup on test failure/panic, and cleanup ordering with t.Cleanup for agents is safe

To request another review round, comment /review.

- Optimize Postgres healthcheck: 115s → 30s max wait
- Optimize MongoDB healthcheck interval: 30s → 5s
- Add pull_policy: build to force image rebuild
- Add restart: on-failure:3 for auto recovery
- Fix cleanup: move compose.Down() to defer
@gustavosbarreto gustavosbarreto force-pushed the fix/test-infrastructure-improvements branch from a9faf01 to b94ed56 Compare April 24, 2026 14:55
@gustavosbarreto gustavosbarreto merged commit c3971de into master Apr 24, 2026
18 of 19 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/test-infrastructure-improvements branch April 24, 2026 15:28
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