Clear cache before retrying to get containers info
When container states unexpectedly change after a reboot, a mechanism within assert_equal_containers_state method retries to get containers info for some time Since lru_cache functionality was introduced, that retry mechanism has not worked properly because the data obtained at every iteration is cached lru_cache needs to be clean before each retry Due to this problem, tests failing at this point were making tox process end without running any more tests, raising the following exception: ValueError: Length too long: 4460487 Change-Id: Ifb45841138737ec49d148c0f4d3626caf709739d
This commit is contained in:
parent
779822ef6b
commit
50c9086349
@ -385,6 +385,8 @@ def assert_equal_containers_state(expected_containers_list=None,
|
||||
to_string(index=False), error_info))
|
||||
LOG.info('container states mismatched:\n{}\n'.format(failures))
|
||||
time.sleep(interval)
|
||||
# clear cache to obtain new data
|
||||
list_node_containers.cache_clear()
|
||||
else:
|
||||
LOG.info("assert_equal_containers_state :"
|
||||
" OK, all containers are on the same state")
|
||||
|
Loading…
x
Reference in New Issue
Block a user