From 74e9373816cab96e57cafe6370bc503695e8af2f Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Mon, 26 Feb 2024 10:27:16 +0000 Subject: [PATCH] ENG-578: Variable name for kill timeout --- fendermint/testing/materializer/src/docker/dropper.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fendermint/testing/materializer/src/docker/dropper.rs b/fendermint/testing/materializer/src/docker/dropper.rs index 20a7d7901..881d63258 100644 --- a/fendermint/testing/materializer/src/docker/dropper.rs +++ b/fendermint/testing/materializer/src/docker/dropper.rs @@ -6,6 +6,9 @@ use bollard::{ Docker, }; +/// Timemout before we kill the container if it doesn't want to stop. +const KILL_TIMEOUT_SECS: i64 = 5; + /// Commands to destroy docker constructs when they go out of scope. pub enum DropCommand { DropNetwork(String), @@ -38,7 +41,12 @@ pub fn start(docker: Docker) -> DropHandle { eprintln!("dropping docker container {id}"); if let Err(e) = docker - .stop_container(&id, Some(StopContainerOptions { t: 5 })) + .stop_container( + &id, + Some(StopContainerOptions { + t: KILL_TIMEOUT_SECS, + }), + ) .await { tracing::error!(