Skip to content

Commit

Permalink
Delete storage in the order the nodes are instantiated
Browse files Browse the repository at this point in the history
Otherwise if it fails before hard_input is defined, the finally clause never deletes the self.n1 storage because there's a second failure _inside_ finally
  • Loading branch information
liamhuber committed Aug 13, 2024
1 parent 02c5552 commit 168f4a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ def test_storage(self):
):
hard_input.save()
finally:
hard_input.delete_storage(backend)
self.n1.delete_storage(backend)
hard_input.delete_storage(backend)

def test_checkpoint(self):
for backend in Node.allowed_backends():
Expand Down

0 comments on commit 168f4a8

Please sign in to comment.