← Back to team overview

launchpad-dev team mailing list archive

Re: Problems with FeatureFlags and test isolation

 

On Thu, Oct 28, 2010 at 10:22 AM, Michael Nelson
<michael.nelson@xxxxxxxxxxxxx> wrote:
> On Mon, Oct 25, 2010 at 12:19 PM, Deryck Hodge
> <deryck.hodge@xxxxxxxxxxxxx> wrote:
>> On Mon, Oct 25, 2010 at 8:38 AM, Graham Binns <graham@xxxxxxxxxxxxx> wrote:
>>> Hi folks,
>>>
>>> So, I'm supposed to be Not Working this week, but I've two branches
>>> hanging over from Friday and I'd like to get them landed so that
>>> Deryck can demo some of the new subscription features at UDS.
>>>
>>
>> Hi, Graham.
>>
>> Thanks for your efforts to get this landed!  Seriously, it's much
>> appreciated.  But you should go enjoy your time away. :-)
>>
>> I'll take over the branches and see if I can work this out and get
>> them landed.  I can chat with people at UDS about the errors if need
>> be and follow up on list.
>
> Deryck (or Maris, anyone), did you get a chance to look into this?
> I've got a branch from a week or two ago that I'm trying to land with
> the same issue (see attached test results).
>
> The tests pass locally - I can only reproduce the error by commenting
> out the line in my test that sets the feature flag.
> I'm also seeing this (see attached test results).
>

Hi, Michael.

I haven't gotten it working yet.  I've only been able to poke at it
here and there with UDS.  I have narrowed it down to the following:

When the test is run by itself, I see:

(Pdb) per_thread.features._rules
{'malone.advanced-subscriptions.enabled': [('default', 999, u'on')]}

When the test is run as part of all the browser tests, I see:

(Pdb) per_thread.features._rules
{}

So I assume _rules is set in a different thread then the one in which
the tests are running when the test is run in a group of tests.  I
haven't worked out what to do about this yet, and haven't caught
Martin of Robert about it yet.

Cheers,
deryck



-- 
Deryck Hodge
https://launchpad.net/~deryck
http://www.devurandom.org/



Follow ups

References