From 4031c888de3b25d8ae4f996562bcac5b48ff37c8 Mon Sep 17 00:00:00 2001 From: chris meyers Date: Thu, 17 May 2018 14:37:32 -0400 Subject: [PATCH] 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 --- awx/main/tests/unit/expect/test_expect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tests/unit/expect/test_expect.py b/awx/main/tests/unit/expect/test_expect.py index 3978cb14c5..a43775ad33 100644 --- a/awx/main/tests/unit/expect/test_expect.py +++ b/awx/main/tests/unit/expect/test_expect.py @@ -90,7 +90,7 @@ def test_cancel_callback_error(): extra_fields = {} status, rc = run.run_pexpect( - ['ls', '-la'], + ['sleep', '2'], HERE, {}, stdout,