From 429cc9b674db8cd89e429f137166034a8c6dc570 Mon Sep 17 00:00:00 2001 From: Geoff Flarity Date: Thu, 28 Sep 2023 10:44:25 -0400 Subject: [PATCH 1/2] reduce timeout in context cancellation propegation test for test stability (#1695) --- docker_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_test.go b/docker_test.go index 8d1a31e227..de607826d4 100644 --- a/docker_test.go +++ b/docker_test.go @@ -1265,7 +1265,7 @@ func TestContainerNonExistentImage(t *testing.T) { }) t.Run("the context cancellation is propagated to container creation", func(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() c, err := GenericContainer(ctx, GenericContainerRequest{ ProviderType: providerType, From c6c7fcf62055bf899d173be449087e85617c94c3 Mon Sep 17 00:00:00 2001 From: Geoff Flarity Date: Thu, 28 Sep 2023 11:33:12 -0400 Subject: [PATCH 2/2] fix TestContainerRunningCheckingStatusCode to pass on arm platforms (#1693) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix TestContainerRunningCheckingStatusCode to pass on arm platforms * Update docker_test.go Co-authored-by: Manuel de la Peña --------- Co-authored-by: Manuel de la Peña --- docker_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker_test.go b/docker_test.go index de607826d4..463b6e2968 100644 --- a/docker_test.go +++ b/docker_test.go @@ -1836,8 +1836,9 @@ func TestContainerCapAdd(t *testing.T) { func TestContainerRunningCheckingStatusCode(t *testing.T) { ctx := context.Background() req := ContainerRequest{ - Image: "influxdb:1.8.10-alpine", - ExposedPorts: []string{"8086/tcp"}, + Image: "influxdb:1.8.10-alpine", + ExposedPorts: []string{"8086/tcp"}, + ImagePlatform: "linux/amd64", // influxdb doesn't provide an alpine+arm build (https://github.com/influxdata/influxdata-docker/issues/335) WaitingFor: wait.ForAll( wait.ForHTTP("/ping").WithPort("8086/tcp").WithStatusCodeMatcher( func(status int) bool {