Closed
Bug 1133273
Opened 10 years ago
Closed 9 years ago
Treeherder tests use treeherder database instead of test_treeherder database after Django 1.7 changes
Categories
(Tree Management :: Treeherder, defect, P2)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1193836
People
(Reporter: jlal, Unassigned)
References
Details
Attachments
(1 file)
4.17 KB,
text/plain
|
Details |
While writing some new tests I could not figure out why the record I was creating was throwing integrity errors it turned out the test database was not being used (or purged) between test runs (perhaps this is intentional?)
Ideally we use the test_treeherder database for tests and drop data on error (I think this was the previous behavior prior to updating django)
Updated•10 years ago
|
Priority: -- → P1
Comment 1•10 years ago
|
||
The Django 1.7 PR included this removal:
https://github.com/mozilla/treeherder-service/commit/698fd0551907d7c8c29514d9a897718e06b23e28#diff-484462fced51d1a06b1d93b4a44dd535L58
Updated•10 years ago
|
Assignee: nobody → cdawson
Priority: P1 → P2
Updated•10 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Summary: Treeherder tests use treeherder database instead of test_treeherder database. → Treeherder tests use treeherder database instead of test_treeherder database after Django 1.7 changes
Comment 3•10 years ago
|
||
Did you get a chance to look at this? (regression from bug 1119479) I'm happy to take it on, just don't want to repeat work if you have a WIP locally :-)
Flags: needinfo?(cdawson)
Comment 4•10 years ago
|
||
Ed-- Hey there. I did not get a chance, no. If you want to take it, that'd be awesome. Thanks man!
Flags: needinfo?(cdawson)
Updated•9 years ago
|
Assignee: emorley → nobody
Comment 6•9 years ago
|
||
(In reply to Ed Morley (UK public holiday 31st Aug) [:emorley] from comment #1)
> The Django 1.7 PR included this removal:
> https://github.com/mozilla/treeherder-service/commit/
> 698fd0551907d7c8c29514d9a897718e06b23e28#diff-
> 484462fced51d1a06b1d93b4a44dd535L58
You might think that just reverting those lines would fix the problem, but I'm afraid it doesn't (see the attached error output). Unfortunately we don't know exactly what's failing because it throws an exception when tearing down the test environment. Oh well.
I suspect our problems probably come from the fact that we call various external commands in the unit tests to initialize the external datasource databases, but these commands aren't inheriting our test settings. I dunno, I could be wrong.
Fixing this bug feels hard, at least to me. Part of me thinks we'd be best off just exorcising datasource and deleting most of conftest.py once everything's in a single database, instead of trying to keep a collection of what are essentially hacks working.
Comment 7•9 years ago
|
||
This was fixed in bug 1193836.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•3 years ago
|
Component: Treeherder: Docs & Development → TreeHerder
You need to log in
before you can comment on or make changes to this bug.
Description
•