[integration tests] some neutron tests fail on fixture setup with StopIteration

Bug #1583586 reported by Georgy Dyuldin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Confirmed
High
MOS QA Team

Bug Description

Test result:

https://mirantis.testrail.com/index.php?/tests/view/5881515

Exception:

Test setup failure

Trace:

self = <CallInfo when='setup' exception: >
func = <function <lambda> at 0x7f9e5e2b8668>, when = 'setup'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
> self.result = func()

tests/local/lib/python2.7/site-packages/_pytest/runner.py:150:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/local/lib/python2.7/site-packages/_pytest/runner.py:138: in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:724: in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:338: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:333: in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:595: in execute
    return _wrapped_call(hook_impl.function(*args), self.execute)
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:253: in _wrapped_call
    return call_outcome.get_result()
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:279: in get_result
    _reraise(*ex) # noqa
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:264: in __init__
    self.result = func()
tests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:596: in execute
    res = hook_impl.function(*args)
tests/local/lib/python2.7/site-packages/_pytest/runner.py:87: in pytest_runtest_setup
    item.session._setupstate.prepare(item)
tests/local/lib/python2.7/site-packages/_pytest/runner.py:408: in prepare
    col.setup()
tests/local/lib/python2.7/site-packages/_pytest/python.py:1421: in setup
    fillfixtures(self)
tests/local/lib/python2.7/site-packages/_pytest/python.py:819: in fillfixtures
    request._fillfixtures()
tests/local/lib/python2.7/site-packages/_pytest/python.py:1569: in _fillfixtures
    item.funcargs[argname] = self.getfuncargvalue(argname)
tests/local/lib/python2.7/site-packages/_pytest/python.py:1612: in getfuncargvalue
    return self._get_active_fixturedef(argname).cached_result[0]
tests/local/lib/python2.7/site-packages/_pytest/python.py:1629: in _get_active_fixturedef
    result = self._getfuncargvalue(fixturedef)
tests/local/lib/python2.7/site-packages/_pytest/python.py:1675: in _getfuncargvalue
    val = fixturedef.execute(request=subrequest)
tests/local/lib/python2.7/site-packages/_pytest/python.py:2137: in execute
    self.yieldctx)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

fixturefunc = <bound method ?.set_debug_logging_for_neutron_l3_agent of <mos_tests.neutron.python_tests.test_dvr.TestDVRRegression object at 0x7f9e5e63c310>>
request = <SubRequest 'set_debug_logging_for_neutron_l3_agent' for <Function 'test_check_router_update_notification_for_l3_agents[(851673)]'>>
kwargs = {'os_conn': <mos_tests.environment.os_actions.OpenStackActions object at 0x7f9e5e641390>}
yieldctx = True

    def call_fixture_func(fixturefunc, request, kwargs, yieldctx):
        if yieldctx:
            if not is_generator(fixturefunc):
                fail_fixturefunc(fixturefunc,
                    msg="yield_fixture requires yield statement in function")
            iter = fixturefunc(**kwargs)
            next = getattr(iter, "__next__", None)
            if next is None:
                next = getattr(iter, "next")
> res = next()
E StopIteration

tests/local/lib/python2.7/site-packages/_pytest/python.py:2042: StopIteration

Reason:

https://github.com/Mirantis/mos-integration-tests/blob/master/mos_tests/neutron/python_tests/test_dvr.py#L1255 - if condition is false, there is no yield in fixture

Tags: area-qa
summary: - [integration tests] test_check_router_update_notification_for_l3_agents
- fails on fixture setup
+ [integration tests] some neutron fails on fixture setup with
+ StopIteration
summary: - [integration tests] some neutron fails on fixture setup with
+ [integration tests] some neutron tests fails on fixture setup with
StopIteration
summary: - [integration tests] some neutron tests fails on fixture setup with
+ [integration tests] some neutron tests fail on fixture setup with
StopIteration
Dina Belova (dbelova)
Changed in mos:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → MOS QA Team (mos-qa)
milestone: none → 9.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.