Skip to content

Commit

Permalink
test: Avoids timeout on CI
Browse files Browse the repository at this point in the history
Improves docs
  • Loading branch information
ignlg committed Apr 19, 2020
1 parent ebf3c44 commit 36fc11c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/pingkeeper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ mod tests {
#[test]
fn spawn_controller_test() {
let mut executor = Executor::new(String::from("cat"));
executor.set_signal("SIGTERM");
// Should spawn
match spawn_controller(&mut executor, &None, true) {
Ok(SpawnOk::SpawnOk(_)) => {}
Expand Down
8 changes: 4 additions & 4 deletions src/pingkeeper/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ pub struct Opt {
#[structopt(long, name = "opts", default_value = "-c1")]
pub ping_opt: String,

/// Use custom command to check
/// Use a custom command to check.
///
/// Check network or something else. This will trigger the execution / kill flow as if it was a network check.
/// Example: --check-cmd "cat canary.txt"
/// Example: `--check-cmd "cat canary.txt"`
#[structopt(long)]
pub check_cmd: Option<String>,
/// Keep <COMMAND> alive.
Expand All @@ -83,9 +83,9 @@ pub struct Opt {
/// Could be any unix signal: `SIGINT`, `SIGTERM`, etc.
#[structopt(short, long, default_value = "SIGINT")]
pub signal: String,
/// Use custom command to kill
/// Use a custom command to kill.
///
/// Example: --kill-cmd "echo \"My baby shot me down\" >> bang_bang.log"
/// Example: `--kill-cmd "echo \"My baby shot me down\" >> bang_bang.log"`
#[structopt(long)]
pub kill_cmd: Option<String>,

Expand Down

0 comments on commit 36fc11c

Please sign in to comment.