[unit test][xena+] test_port_deletion_prevention fails when runs in isolation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Slawek Kaplonski |
Bug Description
Can be reproduced by Just running:-
tox -epy3 -- test_port_
or run any of the below tests individually:-
neutron.
neutron.
Fails as below:-
neutron.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/
return f(self, *args, **kwargs)
File "/home/
return f(self, *args, **kwargs)
File "/home/
pl.
File "/home/
port = port or self._core_
File "/home/
return f_with_retry(*args, **kwargs,
File "/home/
with excutils.
File "/home/
self.
File "/home/
raise self.value
File "/home/
return f(*args, **kwargs)
File "/home/
with excutils.
File "/home/
self.
File "/home/
raise self.value
File "/home/
return f(*args, **kwargs)
File "/home/
with excutils.
File "/home/
self.
File "/home/
raise self.value
File "/home/
return f(*dup_args, **dup_kwargs)
File "/home/
return fn(*args, **kwargs)
File "/home/
lazy_fields = [models_
AttributeError: type object 'Port' has no attribute 'port_forwardings'
It's reproducible Since Xena+ since the inclusion of patch https:/
It do not reproduce if there are other test runs(from the test class) before this test which involve other requests(like network get/create etc) apart from the ones modified in above patch.
Considering above point if this test is modified to run other requests like below then it succeeds:-
self.plugin.
or
self.plugin.
or
with self.port/
self.
)
The issue was originally noticed in a downstream job where unit tests were executed as part of package build. As the tests suite was executed with 100+ concurrency, by chance this test got executed in a worker first of any other test of the class.
Me not sure if there are other test cases which will fail like this when run in isolation.
Changed in neutron: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in neutron: | |
assignee: | nobody → Slawek Kaplonski (slaweq) |
tags: | added: unittest |
Patch proposed https:/ /review. opendev. org/c/openstack /neutron/ +/890342