Activity log for bug #1560437

Date Who What changed Old value New value Message
2016-03-22 11:09:12 Wenzhi Yu bug added bug
2016-03-22 11:09:22 Wenzhi Yu nova: assignee Wenzhi Yu (yuywz)
2016-03-22 11:09:54 Wenzhi Yu description Logic of nova-cells test case 'nova.tests.cells.test_cells_scheduler.test_filter_schedule_skipping' is really odd: def test_filter_schedule_skipping(self): # if a filter handles scheduling, short circuit def _grab(filter_properties): return None self.stubs.Set(self.scheduler, '_grab_target_cells', _grab) def _test(self, *args): raise test.TestingException("shouldn't be called") try: self.scheduler._schedule_build_to_cells(None, None, None, _test, None) except test.TestingException: self.fail("Scheduling did not properly short circuit") It uses a try-except block to ensure that '_test()' function will not be called during case execution, which is odd and poorly readable. Logic of nova-cells test case 'nova.tests.cells.test_cells_scheduler.test_filter_schedule_skipping' is really odd: def test_filter_schedule_skipping(self):  # if a filter handles scheduling, short circuit  def _grab(filter_properties):   return None  self.stubs.Set(self.scheduler, '_grab_target_cells', _grab)  def _test(self, *args):   raise test.TestingException("shouldn't be called")  try:   self.scheduler._schedule_build_to_cells(None, None, None, _test,             None)  except test.TestingException:   self.fail("Scheduling did not properly short circuit") It uses a try-except block to ensure that '_test()' function will not be called during case execution, which is odd and poorly readable.
2016-03-22 11:15:27 Wenzhi Yu description Logic of nova-cells test case 'nova.tests.cells.test_cells_scheduler.test_filter_schedule_skipping' is really odd: def test_filter_schedule_skipping(self):  # if a filter handles scheduling, short circuit  def _grab(filter_properties):   return None  self.stubs.Set(self.scheduler, '_grab_target_cells', _grab)  def _test(self, *args):   raise test.TestingException("shouldn't be called")  try:   self.scheduler._schedule_build_to_cells(None, None, None, _test,             None)  except test.TestingException:   self.fail("Scheduling did not properly short circuit") It uses a try-except block to ensure that '_test()' function will not be called during case execution, which is odd and poorly readable. Logic of nova-cells test case 'nova.tests.unit.cells.test_cells_scheduler.test_filter_schedule_skipping'[1] is really odd: def test_filter_schedule_skipping(self):  # if a filter handles scheduling, short circuit  def _grab(filter_properties):   return None  self.stubs.Set(self.scheduler, '_grab_target_cells', _grab)  def _test(self, *args):   raise test.TestingException("shouldn't be called")  try:   self.scheduler._schedule_build_to_cells(None, None, None, _test,             None)  except test.TestingException:   self.fail("Scheduling did not properly short circuit") It uses a try-except block to ensure that '_test()' function will not be called during case execution, which is odd and poorly readable. [1]https://github.com/openstack/nova/blob/13.0.0.0rc1/nova/tests/unit/cells/test_cells_scheduler.py#L354-L369
2016-03-22 11:27:23 OpenStack Infra nova: status New In Progress
2016-03-22 12:49:16 Sylvain Bauza nova: status In Progress Invalid
2016-03-22 13:23:07 OpenStack Infra nova: status Invalid In Progress
2016-03-22 13:26:07 Wenzhi Yu nova: status In Progress Invalid