Re: [openstack-dev] [oslo] oslo.db reset session?

2016-02-23 Thread Roman Podoliaka
On Tue, Feb 23, 2016 at 7:23 PM, Mike Bayer wrote: > Also I'm not > sure how the enginefacade integration with nova didn't already cover this, I > guess it doesn't yet impact all of those existing MySQLOpportunisticTest > classes it has. Yeah, I guess it's the first test case

Re: [openstack-dev] [oslo] oslo.db reset session?

2016-02-23 Thread Roman Podoliaka
Ok, so I uploaded https://review.openstack.org/#/c/283728/ on the top of Sean's patches. We'll take a closer look tomorrow, if we can just put something like this to oslo.db/sqlalchemy/test_base as a public test fixture. On Tue, Feb 23, 2016 at 7:23 PM, Mike Bayer wrote: > >

Re: [openstack-dev] [oslo] oslo.db reset session?

2016-02-23 Thread Mike Bayer
On 02/23/2016 12:06 PM, Roman Podoliaka wrote: Mike, I think that won't work as Nova creates its own instance of _TransactionContextManager: https://github.com/openstack/nova/blob/d8ddecf6e3ed1e8193e5f6dba910eb29bbe6dac6/nova/db/sqlalchemy/api.py#L134-L135 Maybe we could change

Re: [openstack-dev] [oslo] oslo.db reset session?

2016-02-23 Thread Roman Podoliaka
Mike, I think that won't work as Nova creates its own instance of _TransactionContextManager: https://github.com/openstack/nova/blob/d8ddecf6e3ed1e8193e5f6dba910eb29bbe6dac6/nova/db/sqlalchemy/api.py#L134-L135 Maybe we could change _TestTransactionFactory a bit, so that it takes a context

Re: [openstack-dev] [oslo] oslo.db reset session?

2016-02-23 Thread Mike Bayer
On 02/23/2016 09:22 AM, Sean Dague wrote: With enginefascade working coming into projects, there seems to be some new bits around oslo.db global sessions. The effect of this on tests is a little problematic. Because it builds global state which couples between tests. I've got a review to use

[openstack-dev] [oslo] oslo.db reset session?

2016-02-23 Thread Sean Dague
With enginefascade working coming into projects, there seems to be some new bits around oslo.db global sessions. The effect of this on tests is a little problematic. Because it builds global state which couples between tests. I've got a review to use mysql connection explicitly for some Nova