From 113c68f07474b1147ec5e9a5572b51901aadb64d Mon Sep 17 00:00:00 2001 From: josh-deb Date: Wed, 7 Aug 2024 13:56:29 -0700 Subject: [PATCH] FIX: another case where I had accidently encoded a hardware dependecny, will reword commit if right --- beams/tests/test_check_and_do.py | 9 +++++--- .../29-fix-test-worker.rst | 23 +++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 docs/source/upcoming_release_notes/29-fix-test-worker.rst diff --git a/beams/tests/test_check_and_do.py b/beams/tests/test_check_and_do.py index ce3d179..95b0ec1 100644 --- a/beams/tests/test_check_and_do.py +++ b/beams/tests/test_check_and_do.py @@ -31,8 +31,11 @@ def thisjob(comp_condition, volatile_status, **kwargs) -> None: candd = CheckAndDo.CheckAndDo("yuhh", check, action) candd.setup_with_descendants() - for i in range(1, 10): - time.sleep(.01) - candd.tick_once() + while ( + candd.status != py_trees.common.Status.SUCCESS + and candd.status != py_trees.common.Status.FAILURE + ): + for i in candd.tick(): + time.sleep(.01) assert percentage_complete.value == 100 diff --git a/docs/source/upcoming_release_notes/29-fix-test-worker.rst b/docs/source/upcoming_release_notes/29-fix-test-worker.rst new file mode 100644 index 0000000..a45aec7 --- /dev/null +++ b/docs/source/upcoming_release_notes/29-fix-test-worker.rst @@ -0,0 +1,23 @@ +29 fix-test-worker +################# + +API Breaks +---------- +- N/A + +Features +-------- +- N/A + +Bugfixes +-------- +- test_worker was failing non deterministically due to logically ungated work functions +- test_check_and_do was failing non deterministically due to lack of closed loop ticking + +Maintenance +----------- +- N/A + +Contributors +------------ +- joshc-slac