Skip to content

Commit

Permalink
Cancel shutdown when crashed worker is restarted
Browse files Browse the repository at this point in the history
Otherwise, a test rescheduled from pytest_handlecrashitem hook won't have a
chance to run.

Fix test failure from the previous commit.
  • Loading branch information
amezin committed Sep 4, 2022
1 parent 3f1bdbc commit 6ea8a45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/813.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cancel shutdown when a crashed worker is restarted.
1 change: 1 addition & 0 deletions src/xdist/dsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def worker_errordown(self, node, error):
self.triggershutdown()
else:
self.report_line("\nreplacing crashed worker %s" % node.gateway.id)
self.shuttingdown = False
self._clone_node(node)
self._active_nodes.remove(node)

Expand Down

0 comments on commit 6ea8a45

Please sign in to comment.