← Back to team overview

openstack team mailing list archive

Re: fake_flags + common breakout

 

> 
> I guess another question is, why do you need to set ZeroMQ related flags
> in fake_flags? I think those should only be settings that apply for
> *all* unit tests. I would just register your flags in your unit tests.
> 
> https://github.com/openstack/nova/blob/master/nova/tests/rpc/test_qpid.py#L69
> 
> 
> 


The fake_rabbit flag doesn't, but this is otherwise a good point.   For now, I've just hard-coded the flag into the test.

The specific flag was to set the MatchMaker. I was forcing messages to use a "Localhost" matchmaker. I could override the flag from the test itself, but there might be reasons why someone would want to override this. In fact, I have overridden this to test the various matchmakers.  It is also more transparent.

To be honest, this specific requirement will be much lessened once I write independent tests for the matchmaker classes.

However, it would also be *nice* to be able to override various settings to test them without modifying the modules or tests themselves. I'd like if I could bump up/down the number of ZeroMQ IO threads to use during tests (it defaults to 1).   While modifying the test/module isn't much worse than modifying fake_flags, I find it cleaner.

-- 
Eric Windisch

Follow ups

References