mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Add a bit more delay before ps
calls in plugin persistence tests (#12673)
# Description I've found that sometimes on Linux, this test fails to find the created process even after it should definitely be running. Trying to add a little delay.
This commit is contained in:
parent
d126793290
commit
822c434c12
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ fn plugin_process_exits_after_stop() {
|
||||||
plugin: ("nu_plugin_inc"),
|
plugin: ("nu_plugin_inc"),
|
||||||
r#"
|
r#"
|
||||||
"2.0.0" | inc -m | ignore
|
"2.0.0" | inc -m | ignore
|
||||||
|
sleep 500ms
|
||||||
let pid = (plugin list).0.pid
|
let pid = (plugin list).0.pid
|
||||||
if (ps | where pid == $pid | is-empty) {
|
if (ps | where pid == $pid | is-empty) {
|
||||||
error make {
|
error make {
|
||||||
|
@ -101,7 +102,7 @@ fn plugin_process_exits_when_nushell_exits() {
|
||||||
// use nu to check if process exists
|
// use nu to check if process exists
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
"0",
|
"0",
|
||||||
nu!(format!("ps | where pid == {pid} | length")).out,
|
nu!(format!("sleep 500ms; ps | where pid == {pid} | length")).out,
|
||||||
"plugin process {pid} is still running"
|
"plugin process {pid} is still running"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue