Opened 13 years ago
Closed 13 years ago
#17268 closed Bug (fixed)
r17119 broke the cache tests under PostgreSQL on the CI server
Reported by: | Aymeric Augustin | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Core (Cache system) | Version: | |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
test_add
and test_cache_versioning_add
fail, apparently because of an improper rollback.
Unfortunately, I can't reproduce this problem locally (OS X Lion, PostgreSQL 9.0 from MacPorts).
Attachments (1)
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
I can reproduce it with Debian unstable, Postgres 9.0.5 and psycopg 2.4.2-1 -- The second cache.add in test_add fails due to a violated unique constraint (the same key already exists from the first add) and as a result of this the .get and .commit (in teardown) fails. I fixed it locally via the attached patch, but I am not sure if it's the correct way.
by , 13 years ago
Attachment: | t17268.diff added |
---|
The problem probably appeared as a consequence of the following changes:
django.test.TestCase
instead of adjango.utils.unittest.TestCase
because I wanted to apply theoverride_settings
decorator,transaction.commit()
at the end oftearDown
, otherwise the cache table isn't actually deleted, becausedjango.test.TestCase
is transactional.