Opened 8 years ago

Last modified 8 years ago

#5522 defect new

twisted.internet.test.reactormixins.ReactorBuilder.unbuildReactor uses many non-interface APIs of reactors

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords: tests
Cc: Branch:


_uninstallHandler and disconnectAll are part of no interface, but ReactorBuilder tries to use them to clean up a reactor it just ran. It also uses getDelayedCalls without checking whether the reactor implements IReactorTime.

These uses lead to problems testing reactors that are missing one or more of these APIs.

Attachments (1)

unbuild-reactor.patch (2.1 KB) - added by Jean-Paul Calderone 8 years ago.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Jean-Paul Calderone

Attachment: unbuild-reactor.patch added

comment:1 Changed 8 years ago by Jean-Paul Calderone

Attached a patch that makes these optional using a getattr trick, similar to one that's there already.

Of course, ultimately the real fix is to have reactors know how to clean up after themselves.

Note: See TracTickets for help on using tickets.