]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Don't block on rpc calls in unit tests
authorRussell Bryant <rbryant@redhat.com>
Mon, 1 Dec 2014 20:13:12 +0000 (20:13 +0000)
committerRussell Bryant <rbryant@redhat.com>
Tue, 2 Dec 2014 14:11:58 +0000 (14:11 +0000)
commitd356e2f9f7907010f3a3c0648cfc69f3796a1af7
tree85f9ff164c926743048ce6893e9fbb99d659be20
parent4bdee18097a1362dba212ba8e13a50ec2ceab8c5
Don't block on rpc calls in unit tests

While running unit tests I noticed that all of the test cases from
TestOvsNeutronAgent were taking just over 15 seconds.  This is because
it was waiting for the rpc call response timeout.  Since the tests
weren't actually failing, it's clear the code doesn't actually care
about the response anyway, so just set the messaging config to not
wait for the response.

On my dev box, this dropped test runtime for this file from 1024
seconds to 3 seconds, which is an obvious *HUGE* improvement.

Someone pointed out that an earlier change
(086496bfc45e01cd2905a074d526a7d513bf4ec2) intended to make calls
return immediately for *all* tests, but removing use of RpcProxy
caused this to stop working.

Change-Id: Id07c1d1727a3f4087f0a97681388fb5d69740f8d
neutron/tests/base.py