test(ecs): forward SIGTERM to image-pull fixtures (#8497)

EcsImagePullDockerIntegrationTest's fixture runs sleep 120 as the
container's PID 1, which ignores SIGTERM, so every task stop waited out
Docker's kill timeout. The fixture's task definition now sets
linuxParameters.initProcessEnabled, which runs the container with
docker run --init, so the stop ends as soon as the signal arrives. The
assertions are unchanged.
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-11-15 15:29:09 -04:00
1 parent 8f538679e3
commit 65e737ff2c
1 file changed
+2
@@ -160,6 +160,8 @@ class EcsImagePullDockerIntegrationTest {
app.setName("app");
app.setImage(image);
app.setCommand(List.of("sleep", "120"));
// Forward SIGTERM to the sleeping fixture so task cleanup can finish promptly.
app.setUnparsed(Map.of("linuxParameters", Map.of("initProcessEnabled", true)));
return ecsService.registerTaskDefinition("pull-" + UUID.randomUUID().toString().substring(0, 8),
List.of(app), NetworkMode.bridge, null, null, null, null, null, REGION);
}