Issue 1893892
Created on 2008-02-14 17:20 by mephinet, last changed 2008-03-07 00:52 by richard.
msg2523 |
Author: [hidden] (mephinet) |
Date: 2008-02-14 17:20 |
|
When running the test_xmlrpc unittest not against the anydbm backend, but against postgresql, several problems become visible.
To change the backend to postgresql, you can either:
* in the unittest class, add a second parameter: `db_test_base.setupTracker(self.dirname, "postgresql")` or
* apply SF patch #1893839, which modifies the unittest to run against all available backends.
After the change, you can see the following problems:
1) For all transaction-aware backends, modifications to items are not committed to the database, e.g.:
testChange (test.test_xmlrpc.TestCase_sqlite) ...
[...]
AssertionError: 'Joe Random' != 'Joe Doe'
2) db_test_base.setupTracker doesn't create a valid postgresql installation if the database already exists:
IOError: [Errno 2] No such file or directory: '_test_xmlrpc/db/backend_name'
3) and if you solve 2, you see that xmlrpc.RoundupServer doesn't close the database handler in same use-cases, e.g., after
testAuthDeniedEdit
the next testcase will always fail with:
Error in test testAuthDeniedEdit
[...]
RuntimeError: 10 attempts to create database failed
because the database is still open.
|
msg2524 |
Author: [hidden] (mephinet) |
Date: 2008-02-14 18:19 |
|
sf patch #1893931 tries to fix the mentioned problems, please review and merge.
|
msg2525 |
Author: [hidden] (richard) |
Date: 2008-03-07 00:52 |
|
I believe this is fixed in #1907211 (I could not find #1893931)
|
|
Date |
User |
Action |
Args |
2008-02-14 17:20:05 | mephinet | create | |
|