From f47c01bb5fa5f75eb4665425a14a9fa16315e118 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Tue, 9 Apr 2024 14:04:44 +0200 Subject: [PATCH] maybe fix RocketTest.test_postproc_exception ______________________ RocketTest.test_postproc_exception ______________________ self = def test_postproc_exception(self) -> None: fw = Firework(MalformedAdditionTask()) self.lp.add_wf(fw) launch_rocket(self.lp, self.fworker) fw = self.lp.get_fw_by_id(1) > assert fw.state == "FIZZLED" E AssertionError: assert 'COMPLETED' == 'FIZZLED' E E - FIZZLED E + COMPLETED --- fireworks/core/launchpad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fireworks/core/launchpad.py b/fireworks/core/launchpad.py index 80415ac70..a44a4370c 100644 --- a/fireworks/core/launchpad.py +++ b/fireworks/core/launchpad.py @@ -49,7 +49,7 @@ def sort_aggregation(sort): Args: sort [(str,int)]: sorting keys and directions as a list of - (str, int) tuples, i.e. [('updated_on', 1)] + (str, int) tuples, i.e. [('updated_on', 1)] """ # Fix for sorting by dates which are actually stored as strings: # Not sure about the underlying issue's source, but apparently some @@ -887,7 +887,7 @@ def future_run_exists(self, fworker=None) -> bool: return True # retrieve all [RUNNING/RESERVED] fireworks q = fworker.query if fworker else {} - q.update(state={"$in": ["RUNNING", "RESERVED"]}) + q.update({"state": {"$in": ["RUNNING", "RESERVED"]}}) active = self.get_fw_ids(q) # then check if they have WAITING children for fw_id in active: