Hello Andrew, here is the problem:
https://review.openstack.org/#/c/78406/5/nailgun/nailgun/test/base.py line 268. If you remove this this line then in https://review.openstack.org/#/c/78406/5/nailgun/nailgun/network/manager.py`if` block from line 131 will be run, especially db.commit() which will save all pending changes, including new task_provision.weight value. Regards On Sat, Apr 12, 2014 at 12:33 AM, Andrew Woodward <xar...@gmail.com> wrote: > Recently in one of my changes [1] I was fighting with one of the unit > tests showing a failure for a test which should have been outside the > sphere of influence. > > Traceback (most recent call last): > File > "/home/andreww/.virtualenvs/fuel/local/lib/python2.7/site-packages/mock.py", > line 1190, in patched > return func(*args, **keywargs) > File > "/home/andreww/git/fuel-web/nailgun/nailgun/test/integration/test_task_managers.py", > line 65, in test_deployment_task_managers > self.assertEquals(provision_task.weight, 0.4) > AssertionError: 1.0 != 0.4 > > After walking through a number of times and finally playing with it we > where able to find that the db().refresh(task_provision) call appeared > to be reseting the object. This caused the loss of the weight being > set to 0.4 (1.0 is the model default). db().commit(), db().flush() and > no call to db all caused the test to pass again. > > Does anyone have any input on why this would occur? The oddly odd part > is that this test doesn't fail outside of the change set in [1] > > [1] > https://review.openstack.org/#/c/78406/8/nailgun/nailgun/task/manager.py > > -- > Andrew > Mirantis > Ceph community > > _______________________________________________ > OpenStack-dev mailing list > OpenStack-dev@lists.openstack.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > -- Łukasz Oleś
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev