From bc603d7b9c56c7aae40dda9c942a15f415077d26 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 27 Apr 2026 03:29:06 -0400 Subject: [PATCH] test: drain dead-containers before scale-up assertion The intermediate container count check raced with the existing zero-downtime retire of the previous container, so docker ps still saw the renamed-but-pending container until wait-to-retire elapsed. --- tests/unit/scheduler-docker-local.bats | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit/scheduler-docker-local.bats b/tests/unit/scheduler-docker-local.bats index 4af6c279d..fe9e9531d 100644 --- a/tests/unit/scheduler-docker-local.bats +++ b/tests/unit/scheduler-docker-local.bats @@ -197,6 +197,13 @@ teardown() { echo "status: $status" assert_success + sleep 2 + + run /bin/bash -c "dokku ps:retire" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "docker ps --filter label=com.dokku.app-name=$TEST_APP --filter label=com.dokku.process-type=web --format '{{.Names}}' | wc -l" echo "output: $output" echo "status: $status"