Closed Bug 590776 Opened 15 years ago Closed 15 years ago

Make threadlocal Prefixer die with the request

Categories

(support.mozilla.org :: Code Quality, task, P2)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: erik, Unassigned)

References

Details

(Whiteboard: [qa-])

It currently hangs around past the scope of the current request and makes our test success dependent on the order of their running. Our current need to "prime" the Client class by making some arbitrary request before testing is a symptom of this.
To clarify, the threadlocal is currently set on the way into the request by a piece of middleware (LocaleURLMiddleware), so symmetry demands that it be unset on the way out. This will expose any incorrect tests with loud, immediate, reliable failures so we can fix them. Said fix is also in scope for this bug.
We need to "prime" it because otherwise it is not set at all, not set but incorrect.
This bug does *not* fix the random IntegrityError failures: I get one intermittently and another reliably after rebasing this branch. Grrr.
Fixed in http://github.com/jsocol/kitsune/commit/c7da7d9728837c09da7b11981640185a8ba7781a QA: this is mostly a change to our automated tests, so the other devs will be constantly QAing this. However, if you were to see any bad URLs generated (perhaps missing locales or having them where they shouldn't), this should be a suspect.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
I would just mark this [qa-] and have QA file bugs as they come up (and related ones would be regressions).
Closed as [qa-]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.