Skip to content

Commit

Permalink
maybe fix RocketTest.test_postproc_exception
Browse files Browse the repository at this point in the history
______________________ RocketTest.test_postproc_exception ______________________

self = <fireworks.core.tests.test_rocket.RocketTest testMethod=test_postproc_exception>

    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
  • Loading branch information
janosh committed Apr 9, 2024
1 parent 3fcc340 commit f47c01b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fireworks/core/launchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f47c01b

Please sign in to comment.