Layer tearDown isn't called when running more processes

Bug #579019 reported by Sidnei da Silva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.testing
Fix Released
Medium
Sidnei da Silva
zope.testrunner
Fix Released
Medium
Sidnei da Silva

Bug Description

When running some tests with '-j2' I noticed that the tearDown of some layers are not run. I particularly noticed this one because the layer setUp starts a subprocess and tearDown should kill it, so it doesn't get killed.

Looking at the source of zope.testing (3.8.7), I see this:

              if self.options.processes > 1:
                should_resume = True
                break

        if should_resume:
            setup_layers = None
            if layers_to_run:
                self.ran += resume_tests(
                    self.script_parts, self.options, self.features,
                    layers_to_run, self.failures, self.errors)

        if setup_layers:
            if self.options.resume_layer is None:
                self.options.output.info("Tearing down left over layers:")
            tear_down_unneeded(self.options, (), setup_layers, True)

If I remove the line that has 'setup_layers = None' then the layer tearDown gets called properly.

Related branches

Sidnei da Silva (sidnei)
Changed in zope.testing:
importance: Undecided → Medium
Sidnei da Silva (sidnei)
Changed in zope.testrunner:
importance: Undecided → Medium
Changed in zope.testing:
assignee: nobody → Sidnei da Silva (sidnei)
Changed in zope.testrunner:
assignee: nobody → Sidnei da Silva (sidnei)
Sidnei da Silva (sidnei)
description: updated
Sidnei da Silva (sidnei)
Changed in zope.testing:
status: New → Fix Committed
Changed in zope.testrunner:
status: New → Fix Committed
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.testing:
status: Fix Committed → Fix Released
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.testrunner:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.