Opened 9 years ago

Last modified 8 years ago

#1334 enhancement new

Custom Trial reactor to track resources and handle cleanup

Reported by: jml Owned by:
Priority: normal Milestone:
Component: trial Keywords:
Cc: glyph, radix, exarkun, spiv, itamarst, warner, jml, jknight Branch:
Author: Launchpad Bug:

Description


Change History (5)

comment:1 Changed 9 years ago by jml

Suggestion:
Trial implements a reactor.  All Trial's reactor implementation does is wrap a
real reactor (whichever is specified).  All calls into the reactor are noted and
tracked.  When a test method is finished, any event sources it created but did
not clean up are marked as errors and cleaned up.  When a test class is
finished, any event sources its setUpClass created but did not clean up are
marked as errors and cleaned up.  Anything that is trial internal (say, a
connection to a remote observer used by the reporter) can be ignored safely, and
object lifetimes can be discovered correctly.

This is not a silver bullet.  It will be tedious to implement.  There are cases
it will not automatically handle and will need to be assisted with.  I think a
few simple heuristics can cover most circumstances, but trial may also need an
annotation API to explicitly delineate certain edge cases.

comment:2 Changed 8 years ago by jml

Fixing this would fix #343

comment:3 Changed 8 years ago by jml

Would fix #1304 also

comment:4 Changed 8 years ago by jml

  • Owner set to jml

comment:5 Changed 3 years ago by <automation>

  • Owner jml deleted
Note: See TracTickets for help on using tickets.