mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
test(ecs): let the Docker test containers exit on SIGTERM instead of sitting out stopTimeout (#4211)
This commit is contained in:
1 parent
b10c02f5fe
commit
620d717653
2 files changed
+6
-2
No files matched your search
+3
-1
@@ -118,7 +118,9 @@ class EcsContainerManagerStatsDockerIntegrationTest {
|
||||
ContainerDefinition definition = new ContainerDefinition();
|
||||
definition.setName(name);
|
||||
definition.setImage(BUSYBOX_IMAGE);
|
||||
definition.setCommand(List.of("sleep", "60"));
|
||||
// PID 1 gets no default SIGTERM handler, so a bare "sleep 60" sits out the whole
|
||||
// stopTimeout grace period on teardown, once per container in the task.
|
||||
definition.setCommand(List.of("sh", "-c", "trap 'exit 0' TERM; sleep 60 & wait"));
|
||||
return definition;
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -67,7 +67,9 @@ class EcsExecChannelDockerIntegrationTest {
|
||||
ContainerDefinition app = new ContainerDefinition();
|
||||
app.setName("app");
|
||||
app.setImage(BUSYBOX_IMAGE);
|
||||
app.setCommand(List.of("sleep", "120"));
|
||||
// PID 1 gets no default SIGTERM handler, so a bare "sleep 120" sits out the whole
|
||||
// stopTimeout grace period on teardown.
|
||||
app.setCommand(List.of("sh", "-c", "trap 'exit 0' TERM; sleep 120 & wait"));
|
||||
|
||||
TaskDefinition taskDefinition = new TaskDefinition();
|
||||
taskDefinition.setFamily("exec-docker-" + suffix);
|
||||
|
||||
Reference in new issue
Block a user