Skip to content

Commit

Permalink
ENG-578: Variable name for kill timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Feb 26, 2024
1 parent 3a833e5 commit 74e9373
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fendermint/testing/materializer/src/docker/dropper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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!(
Expand Down

0 comments on commit 74e9373

Please sign in to comment.