﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8311	Changeset 8342 makes test suite hang if memcached is not running	jcrocholl	nobody	"Up to changeset [8341] my project works okay. After upgrading to [8342], `manage.py test` hangs at 100% CPU, with the following Traceback after Ctrl+C:

{{{
............^CTraceback (most recent call last):
  ... (beginning of doctest stack trace omitted) ...
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/unittest.py"", line 428, in __call__
    return self.run(*args, **kwds)
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/unittest.py"", line 424, in run
    test(result)
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/unittest.py"", line 281, in __call__
    return self.run(*args, **kwds)
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/unittest.py"", line 260, in run
    testMethod()
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/test/_doctest.py"", line 2174, in runTest
    failures, tries = runner.run(
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/test/_doctest.py"", line 1403, in run
    return self.__run(test, compileflags, out)
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/test/_doctest.py"", line 1267, in __run
    compileflags, 1) in test.globs
  File ""<doctest django.contrib.sessions.tests[56]>"", line 1, in ?
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/contrib/sessions/backends/base.py"", line 233, in flush
    self.create()
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/contrib/sessions/backends/cache.py"", line 20, in create
    self.session_key = self._get_new_session_key()
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/contrib/sessions/backends/base.py"", line 137, in _get_new_session_key
    session_key = md5_constructor(""%s%s%s%s""
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/random.py"", line 188, in randrange
    return int(istart + self._randbelow(width))
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/random.py"", line 235, in _randbelow
    r = getrandbits(k)
KeyboardInterrupt
}}}

The hanging test seems to be in django.contrib.sessions.tests line 56 or so."		closed	contrib.sessions	dev		fixed		johann@… Trevor Caira	Accepted	0	0	0	0	0	0
