Apache Mod-Python - Updated: (MODPYTHON-119) DBM Session test shouldn't use

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > August 2006 > Updated: (MODPYTHON-119) DBM Session test shouldn't use





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Updated: (MODPYTHON-119) DBM Session test shouldn't use
Graham Dumpleton (JIRA)

2006-08-12, 7:13 am

[ http://issues.apache.org/jira/brows...ON-119?page=all ]

Graham Dumpleton updated MODPYTHON-119:
---------------------------------------

Fix Version/s: 3.3
3.2.10
(was: 3.2.x)

> DBM Session test shouldn't use default database.
> ------------------------------------------------
>
> Key: MODPYTHON-119
> URL: http://issues.apache.org/jira/browse/MODPYTHON-119
> Project: mod_python
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.7
> Reporter: Graham Dumpleton
> Assigned To: Jim Gallacher
> Fix For: 3.3, 3.2.10
>
>
> The test_Session_Session_conf() of test/test.py doesn't override the default DBM session database name that would be used for prefork/worker MPM variants. This means that if there is already an instance of Apache running as its designated user which has

already created the session database and the tests are run as a different user, the test will fail. Further, if mod_python has never previously been used and no session database exists, the test will succeed, but when someone goes to use sessions in the
installed mod_python, it will fail in the case where the session database created by the test was as a different user to that which Apache runs as.
> The test suite should ensure that it overrides any defaults and stores such databases in test suite document tree. It should possibly also ensure that such transient files are removed so as not to create a problem on subsequent tests.
> Test might therefore be changed to:
> def test_Session_Session_conf(self):
> database = os.path.join(TESTHOME,"mp_sess_test.dbm")
> c = VirtualHost("*",
> ServerName("test_Session_Session"),
> DocumentRoot(DOCUMENT_ROOT),
> Directory(DOCUMENT_ROOT,
> PythonOption('session_dbm "%s"' % database),
> SetHandler("mod_python"),
> PythonHandler("tests::Session_Session"),
> PythonDebug("On")))
> return str(c)


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com