def run(self):
'''
Restarts the RabbitMQ broker using a method derived from the TEST_DISTRIBUTION
environmental variable.
If TEST_DISTRIBUTION=="arch", will try to restart rabbitmq using the linux ``systemctl``
command.
If TEST_DISTRIBUTION=="ubuntu", will try to restart rabbitmq using the linux ``service``
command.
Will wait for 20 seconds after restarting before returning.
:raises ValueError: if TEST_DISTRIBUTION environmental variable not found
.. note:: the user who invokes this method will likely require sudo access to the linux commands.
This can be provided by editing the sudoers file.
'''
await self.loop.run_in_executor(None, self._run)
await asyncio.sleep(20)
评论列表
文章目录