a10networks / a10-neutron-lbaas

A10 Networks, Openstack Neutron LBaaS Driver
Apache License 2.0
9 stars 19 forks source link

4F Test Heisenbug #206

Closed Cedev closed 8 years ago

Cedev commented 8 years ago

Fix the Heisenbug in the tests that causes 4 test failures.

Failure looks like:

======================================================================
FAIL: test_context (a10_neutron_lbaas.tests.unit.v1.test_a10_context.TestA10ContextADP)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v1/test_a10_context.py", line 34, in test_context
    self.empty_mocks()
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v1/test_a10_context.py", line 142, in empty_mocks
    self.m['tenant_id'])
  File "/home/travis/build/a10networks/a10-neutron-lbaas/.tox/py27/lib/python2.7/site-packages/mock.py", line 835, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: active('faketen1')
Actual call: active('mypart')
-------------------- >> begin captured stdout << ---------------------
('OPENSTACK ', [])
('CLIENT ', [call.system.partition.active('mypart')])
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: test_context_e (a10_neutron_lbaas.tests.unit.v1.test_a10_context.TestA10ContextADP)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v1/test_a10_context.py", line 41, in test_context_e
    self.empty_mocks()
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v1/test_a10_context.py", line 142, in empty_mocks
    self.m['tenant_id'])
  File "/home/travis/build/a10networks/a10-neutron-lbaas/.tox/py27/lib/python2.7/site-packages/mock.py", line 835, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: active('faketen1')
Actual call: active('mypart')
-------------------- >> begin captured stdout << ---------------------
('OPENSTACK ', [])
('CLIENT ', [call.system.partition.active('mypart')])
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: test_context (a10_neutron_lbaas.tests.unit.v2.test_a10_context.TestA10ContextADP)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v2/test_a10_context.py", line 41, in test_context
    self.empty_mocks()
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v2/test_a10_context.py", line 143, in empty_mocks
    self.m.tenant_id[0:13])
  File "/home/travis/build/a10networks/a10-neutron-lbaas/.tox/py27/lib/python2.7/site-packages/mock.py", line 835, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: active('get-off-my-la')
Actual call: active('mypart')
-------------------- >> begin captured stdout << ---------------------
('OPENSTACK ', [])
('CLIENT ', [call.system.partition.active('mypart')])
('NEUTRON ', [call.__nonzero__()])
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: test_context_e (a10_neutron_lbaas.tests.unit.v2.test_a10_context.TestA10ContextADP)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v2/test_a10_context.py", line 48, in test_context_e
    self.empty_mocks()
  File "/home/travis/build/a10networks/a10-neutron-lbaas/a10_neutron_lbaas/tests/unit/v2/test_a10_context.py", line 143, in empty_mocks
    self.m.tenant_id[0:13])
  File "/home/travis/build/a10networks/a10-neutron-lbaas/.tox/py27/lib/python2.7/site-packages/mock.py", line 835, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: active('get-off-my-la')
Actual call: active('mypart')
-------------------- >> begin captured stdout << ---------------------
('OPENSTACK ', [])
('CLIENT ', [call.system.partition.active('mypart')])
('NEUTRON ', [call.__nonzero__()])
--------------------- >> end captured stdout << ----------------------
Cedev commented 8 years ago

Fixed in PR #205 in orchestration.