Skip to content

Commit

Permalink
Modified test_execute_DAG_retries
Browse files Browse the repository at this point in the history
Using `GufeKeys` to further sort DAGs with
`lexicographical_topological_sort`, the execution order of
`ProtocolUnits` for this particular `Protocol` differed from the
original implementation using `topological_sort`. This new sorting
placed the guaranteed-to-fail `ProtocolUnit` later, allowing `ok`
results to accumulate. This change reflects the new ordering,
resulting in 26 total results instead of 5, now accounting for the 21
`SimulationUnits` that complete before `BrokenSimulationUnit` fails.
  • Loading branch information
ianmkenney committed Oct 22, 2024
1 parent 15e77fd commit 7b0f5a8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions gufe/tests/test_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,11 +701,16 @@ def test_execute_DAG_retries(solvated_ligand, vacuum_ligand, tmpdir):
n_retries=3)

assert not r.ok()
# we did 3 retries, so 4 total failures
assert len(r.protocol_unit_results) == 5
assert len(r.protocol_unit_failures) == 4
assert len(list(shared.iterdir())) == 5

number_unit_failures = len(r.protocol_unit_failures)
number_unit_results = len(r.protocol_unit_results)
number_dirs = len(list(shared.iterdir()))

# failed first attempt of BrokenSimulationUnit, failed 3 retries
assert number_unit_failures == 4
# InitializeUnit and 21 SimulationUnits run before guaranteed
# final failure
assert number_unit_results == number_dirs == 26

def test_execute_DAG_bad_nretries(solvated_ligand, vacuum_ligand, tmpdir):
protocol = BrokenProtocol(settings=BrokenProtocol.default_settings())
Expand Down

0 comments on commit 7b0f5a8

Please sign in to comment.