Opened 4 years ago

Last modified 3 years ago

#5080 defect new

refleak in twisted.test.test_pb.BrokerTestCase.test_publishable

Reported by: catlee Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description (last modified by thijs)

As demonstrated in this patch, test_publishable leaks [<twisted.test.test_pb.DumbPub instance at 0x2111200>, <twisted.spread.pb.RemoteReference instance at 0x21115f0>] when run. Possibly an indication of an underlying reference leak?

  • twisted/test/test_pb.py

     
    723723        self.assertIdentical(vcc.observer, None, "observer was not removed") 
    724724 
    725725    def test_publishable(self): 
     726        gc.collect() 
     727        old_garbage = len(gc.garbage) 
    726728        try: 
    727729            os.unlink('None-None-TESTING.pub') # from RemotePublished.getFileName 
    728730        except OSError: 
     
    750752        # timestamp's clean, our cache file is up-to-date 
    751753        self.assertEquals(obj._wasCleanWhenLoaded, 1) 
    752754 
     755        gc.collect() 
     756        self.assertEquals(len(gc.garbage), old_garbage, "Uncollectable garbage: %s" % gc.garbage) 
     757 
    753758    def gotCopy(self, val): 
    754759        self.thunkResult = val.id 
    755760 

Change History (1)

comment:1 Changed 3 years ago by thijs

  • Description modified (diff)
Note: See TracTickets for help on using tickets.