Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/fixtures/docker/compose.override.mongodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ services:
teams-api:
depends_on: [mongodb]
image: us-central1-docker.pkg.dev/computer-vision-team/dev-docker/fiftyone-teams-api:${FIFTYONE_TEAMS_API_VERSION}
# Force unbuffered stdout so the startup log line is flushed immediately
# rather than sitting in a block buffer. Prevents flaky log assertions in
# the integration tests (see checkContainerLogsWithRetries).
environment:
PYTHONUNBUFFERED: "1"
teams-app:
depends_on: [mongodb]
image: us-central1-docker.pkg.dev/computer-vision-team/dev-docker/fiftyone-teams-app:${FIFTYONE_TEAMS_APP_VERSION}
Expand Down
10 changes: 8 additions & 2 deletions tests/integration/compose/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ func get_logs(t *testing.T, dockerOptions *docker.Options, container string) str
}

func checkContainerLogsWithRetries(subT *testing.T, dockerOptions *docker.Options, container string, tc string, expected string) {
maxRetries := 6
retryDelay := 2 * time.Second
// Give the log assertion at least as much headroom as validate_endpoint
// (10 x 3s = 30s), plus margin. On loaded CI runners the larger compose
// stacks (e.g. dedicated plugins) can take longer to emit their startup
// line than the previous 6 x 2s (~12s) budget allowed, which caused
// non-deterministic failures where an otherwise-healthy container's log
// line had not yet surfaced within the window.
maxRetries := 15
retryDelay := 3 * time.Second

var log string

Expand Down
Loading