Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1927

Show
Ignore:
Timestamp:
03/17/08 11:56:26
Author:
fumanchu
Message:

test_refleaks really shouldn't share its http conn across threads.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/test/test_refleaks.py

    r1800 r1927  
    55 
    66import gc 
     7import httplib 
    78import threading 
     9 
    810import cherrypy 
    911from cherrypy import _cprequest 
     
    8587    def test_threadlocal_garbage(self): 
    8688        def getpage(): 
    87             self.getPage('/') 
    88             self.assertBody("Hello world!") 
     89            if self.scheme == 'https': 
     90                c = httplib.HTTPSConnection('127.0.0.1:%s' % self.PORT) 
     91            else: 
     92                c = httplib.HTTPConnection('127.0.0.1:%s' % self.PORT) 
     93            try: 
     94                c.request('GET', '/') 
     95                resp = c.getresponse() 
     96                self.assertEqual(resp.status, 200) 
     97                self.assertEqual(resp.read(), "Hello world!") 
     98            finally: 
     99                c.close() 
    89100         
    90101        ts = [] 

Hosted by WebFaction

Log in as guest/cpguest to create tickets