← Back to team overview

launchpad-dev team mailing list archive

Re: Test isolation failure

 

On Tue, 02 Nov 2010 10:23:23 Aaron Bentley wrote:
> As discussed with thumper,
> 
> On this branch: lp:~abentley/launchpad/incremental-diff-job
> 
> This fails:
> xvfb-run bin/test branchmergeproposal -vt
> lp.code.browser.tests.test_branchmergeproposal.TestBranchMergeProposalView.
> test_getRevisionsIncludesIncrementalDiffs -t test_conversation

Hi Guys,

I've chased down the underlying issue, and it kinda sucks.

I have a reviewed / approved branch ready to land that fixes this.  It is 
entering ec2 now.

https://code.launchpad.net/~thumper/launchpad/fix-features/+merge/39819

What was happening was that the set_feature_flag was creating a new feature 
object.  This was being flushed, and the store.flush ended up calling into the 
_get_request_timeout method, which wanted to check feature flags, which loaded 
the flags and stored an empty dict in _rules.  So a check for the feature 
failed directly after adding it.

I'm sure there is still some leaky isolation errors in the publication thread 
local storage between tests, but this solution was discussed with Robert, and 
it works.

Effectively it tells the adapter code not to look for features for hard 
timeouts for any of our tests.

Tim