Make layer setup/teardown failures more useful
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.
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.
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:/
see also bug 892427