def _flush_volume_plugin_reactor_on_endpoint_render(self):
        real_execute_endpoint = self.app.execute_endpoint

        def patched_execute_endpoint(*args, **kwargs):
            val = real_execute_endpoint(*args, **kwargs)
            while self.volume_plugin_reactor.getDelayedCalls():
                pending_calls = self.volume_plugin_reactor.getDelayedCalls()
                next_expiration = min(t.getTime() for t in pending_calls)
                now = self.volume_plugin_reactor.seconds()
                self.volume_plugin_reactor.advance(
                    max(0.0, next_expiration - now))
            return val
        self.patch(self.app, 'execute_endpoint', patched_execute_endpoint)
Use this decorator to configure plugin's attributes.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/dockerplugin/test/test_api.py/APITestsMixin._flush_volume_plugin_reactor_on_endpoint_render--crossover with--dataset/ETHPy150Open openstack/rally/rally/common/plugin/plugin.py/configure