fork process may finish before cancel callback

* The "should we cancel?" callback check is only called while the
subprocess (child) is alive. If the child executes quickly, the cancel
callback has no chance to run.
* call a subprocess that takes longer to run like sleep 2
This commit is contained in:
chris meyers 2018-05-17 14:37:32 -04:00
parent d8615df47f
commit 4031c888de

View File

@ -90,7 +90,7 @@ def test_cancel_callback_error():
extra_fields = {}
status, rc = run.run_pexpect(
['ls', '-la'],
['sleep', '2'],
HERE,
{},
stdout,