Make layer setup/teardown failures more useful

Bug #806382 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

There has been a problem where globally installed RabbitMQ plugins
prevent ephemerally created Rabbit server instances (created by the
fixture) from starting.

From the fixture's details - only available by prodding around with
pdb, because layers don't grok fixtures - it's not obvious what the
cause is, so we wanted to print a message when layer setup failed to
suggest the source of the problem to others.

It would also be good to get zope.testing to understand fixtures so
that it can report details from used fixtures.

Raphael implemented the first part but lifeless rightly pointed out
that this "will break subunit and our parallel tests", and "Exceptions
are great, prints are terrible".

Raphael tweaked the proposal, but lifeless came back with a better
suggestion:

  It involves fixing zope.testing.testrunner a little, and has three
  distinct parts.

  Part one: make failures in layer setup output as a failed test
  properly (it sortof does this in --subunit mode, but it should do it
  in regular mode too).

  Part two: Expose the synthetic test used for reporting layer setup
  as a global variable (so that ConcreteLayer.setUp() can access it
  without a signature change).

  Part three: use the fixture extended API (which includes getDetails)
  to get the fixture error details, and that can then be attached to
  the synthetic test for the layer setup, which the test reporter will
  then show.

He also says that these parts are all pretty small, but they add up to
significantly more than a drive-by fix that this was originally meant
to be.

The originating proposal:

  https://code.launchpad.net/~rvb/launchpad/rabbit-error-plugins/+merge/67000

Revision history for this message
Martin Pool (mbp) wrote :

see also bug 892427

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.