Avoid sending cast after server shutdown in functional test

The server test fixtures attempt to send a cast to the server during
server cleanup.  This cast is sent after the server is shut down, so
the cast only goes as far as the message bus.  This is fine for
intermediary-based message buses such as brokers, but for
point-to-point connections this can cause the cast to hang since there
is no recipient for the cast.

Change-Id: I2967ef21deb12dc1f84f6dc97a894778aeb42666
Closes-Bug: #1616487
This commit is contained in:
Kenneth Giusti 2016-08-24 11:40:15 -04:00
parent 86df23d979
commit 88003cb79d

@ -111,8 +111,9 @@ class RpcServerFixture(fixtures.Fixture):
def _stop(self):
self.thread.stop()
self._ctrl.cast({}, 'ping')
self.thread.join()
self.thread.join(timeout=30)
if self.thread.isAlive():
raise Exception("Server did not shutdown correctly")
def ping(self, ctxt):
pass
@ -355,8 +356,9 @@ class NotificationFixture(fixtures.Fixture):
def _stop(self):
self.thread.stop()
self._ctrl.sample({}, 'shutdown', 'shutdown')
self.thread.join()
self.thread.join(timeout=30)
if self.thread.isAlive():
raise Exception("Server did not shutdown properly")
def notifier(self, publisher, topic=None):
transport = self.useFixture(TransportFixture(self.conf, self.url))