test_web: remove test_GET_DIRURL_large, it failed to exercise the problem in #237 and consumes a disproportionate amount of time

This commit is contained in:
Brian Warner 2008-02-13 13:08:26 -07:00
parent 98f570c3ee
commit 871e7756f7

View File

@ -650,37 +650,6 @@ class Web(WebMixin, unittest.TestCase):
self.public_url + "/foo?t=bogus")
return d
def test_GET_DIRURL_large(self):
# Nevow has a problem showing more than about 192 children of a
# directory: it uses defer.success() and d.addCallback in a way that
# can make the stack grow very quickly. See ticket #237 for details.
# To work around this, I think we'll need to put a 'return
# defer.fireEventually' in our render_ method. This test is intended
# to trigger the bug (and eventually verify that our workaround
# actually works), but it isn't yet failing for me.
d = self.s.create_empty_dirnode()
COUNT = 200
def _created(dirnode):
entries = [ (str(i), self._foo_uri) for i in range(COUNT) ]
d2 = dirnode.set_uris(entries)
d2.addCallback(lambda res: dirnode)
return d2
d.addCallback(_created)
def _check(dirnode):
large_url = "/uri/" + dirnode.get_uri() + "/"
return self.GET(large_url)
d.addCallback(_check)
def _done(res):
m = r'<a href="/uri/URI%3ADIR2%3A[^"]+">' + ("%d" % (COUNT-1)) + r'</a>'
self.failUnless(re.search(m, res))
self.failIf("maximum recursion depth exceeded" in res)
d.addCallback(_done)
return d
test_GET_DIRURL_large.timeout= 240 # this hits 120-sec timeout on overloaded vm buildslaves
def test_GET_DIRURL_json(self):
d = self.GET(self.public_url + "/foo?t=json")
d.addCallback(self.failUnlessIsFooJSON)