mirror of
https://github.com/docker/compose.git
synced 2026-09-25 06:54:41 +00:00
Several e2e tests used fixed host ports (8070, 8080, 8090, etc.), global buildx builders registered with --use, and a hardcoded IPC container name. Under parallel execution these shared daemon-level resources caused port conflicts, buildkitd container-name collisions, and intermittent failures. Separately, the standalone make target hardcoded -parallel=1, forcing the entire standalone suite to run serially even though the same tests run in parallel in plugin mode. Changes: - Convert fixed host ports in four fixtures (network-test, sentences, build-test, volume-test) to ephemeral bindings; add ServicePublishedPort helper to framework.go to resolve the actual mapped port at runtime. - Give each buildx-builder test a unique daemon-scoped name via BuilderName helper, preventing container-name collisions between parallel goroutines. Applies to TestBuildPlatformsWithCorrectBuildxConfig, TestBuildPrivileged, TestBuildBuilder, TestBuildEntitlements, TestBuildTLS. - Rename the fixed ipc_mode_container to a project-scoped name (ipc_e2e-src) and update the ipc-test fixture accordingly. - Replace the hardcoded -parallel=1 in make e2e-compose-standalone with E2E_PARALLEL_PLUGIN?=4 and E2E_STANDALONE_PARALLEL?=4, aligning both modes with the effective GOMAXPROCS on 4-core GitHub Actions runners. Both variables are overridable (E2E_STANDALONE_PARALLEL=1 restores serial local debugging). - Raise the poll delay in watch_test.go long-running polls (90s/120s timeout) from the default 100ms to 1s; bump cascade_test.go and publish_test.go from 100ms to 500ms. Reduces CPU pressure without affecting effective test duration. The logging-driver fixture retains its fixed port 24224: the Docker fluentd log driver encodes fluentd-address at service-start time, making ephemeral resolution non-trivial. TestLoggingDriver is serial so there is no collision risk in practice. Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
26 lines
788 B
YAML
26 lines
788 B
YAML
services:
|
|
fluentbit:
|
|
image: fluent/fluent-bit:3.1.7-debug
|
|
ports:
|
|
# Port 24224 intentionally fixed: the Docker fluentd log driver sets
|
|
# fluentd-address at service-start time (see compose.yaml and
|
|
# TestLoggingDriver in compose_up_test.go). Dynamic resolution would
|
|
# require a two-phase compose up which is unnecessarily invasive.
|
|
# TestLoggingDriver is serial (no t.Parallel()), so collision risk is nil.
|
|
- "24224:24224"
|
|
- "24224:24224/udp"
|
|
environment:
|
|
FOO: ${BAR}
|
|
|
|
app:
|
|
image: alpine
|
|
init: true
|
|
command: sleep infinity
|
|
depends_on:
|
|
fluentbit:
|
|
condition: service_started
|
|
restart: true
|
|
logging:
|
|
driver: fluentd
|
|
options:
|
|
fluentd-address: ${HOST:-127.0.0.1}:24224
|