]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
tests: confirm that _output_hosts_file does not log too often
authorIhar Hrachyshka <ihrachys@redhat.com>
Mon, 20 Apr 2015 15:06:38 +0000 (17:06 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Tue, 21 Apr 2015 16:53:28 +0000 (18:53 +0200)
commit3b74095a935f6d2027e6bf04cc4aa21f8a1b46f2
tree305b795f4aae4573063e74fa6108aaf11162e71f
parentd7d30bf6595a705ec53d697a0695cf01299c482a
tests: confirm that _output_hosts_file does not log too often

I3ad7864eeb2f959549ed356a1e34fa18804395cc didn't include any regression unit
tests to validate that the method won't ever log too often again,
reintroducing performance drop in later patches. It didn't play well
with stable backports of the fix, where context was lost when doing the
backport, that left the bug unfixed in stable/juno even though the patch
was merged there [1].

The patch adds an explicit note in the code that suggests not to add new
log messages inside the loop to avoid regression, and a unit test was
added to capture it.

Once the test is merged in master, it will be proposed for stable/juno
inclusion, with additional changes that would fix the regression again.

Related-Bug: #1414218
Change-Id: I5d43021932d6a994638c348eda277dd8337cf041
neutron/agent/linux/dhcp.py
neutron/tests/unit/agent/linux/test_dhcp.py