'If the underlying producer raises an exception when resumeProducing is
called, the streaming wrapper should log the error, unregister from
the consumer and stop streaming even if the unregisterProducer call
also raise.'

def test_resumeProducingRaiseAndUnregisterProducerRaises(self):

    consumer = StringTransport()
    def raiser():
        raise RuntimeError()
    consumer.unregisterProducer = raiser
    return self.resumeProducingRaises(consumer, [(ZeroDivisionError, 'failed,    producing    will    be    stopped'), (RuntimeError, 'failed    to    unregister    producer')])
