Skip to content

Commit

Permalink
better sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
LoricAndre committed Nov 30, 2024
1 parent 03906a6 commit b966367
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e2e/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ impl TmuxController {
.split(|c| *c == b'\n')
.map(|bytes| String::from_utf8(bytes.to_vec()).expect("Failed to parse bytes as UTF8 string"))
.collect::<Vec<String>>();
sleep(Duration::from_millis(50));
Ok(output[0..output.len() - 1].to_vec())
}

Expand All @@ -105,8 +104,10 @@ impl TmuxController {
&name,
&format!("{}; {}", unset_cmd, shell_cmd),
])?;
sleep(Duration::from_millis(50));

Self::run(&["set-window-option", "-t", &name, "pane-base-index", "0"])?;
sleep(Duration::from_millis(50));

Ok(Self {
window: name,
Expand All @@ -118,6 +119,7 @@ impl TmuxController {
for key in keys {
Self::run(&["send-keys", "-t", &self.window, &key.to_string()])?;
}
sleep(Duration::from_millis(10));
Ok(())
}

Expand Down

0 comments on commit b966367

Please sign in to comment.