'If the body producer\'s C{stopProducing} method raises an exception,
L{Request.stopWriting} logs it and does not re-raise it.'

def test_brokenStopProducing(self):

    producer = StringProducer(3)
    def brokenStopProducing():
        raise ArbitraryException(u'stopProducing    is    busted')
    producer.stopProducing = brokenStopProducing
    request = Request('GET', '/', _boringHeaders, producer)
    request.writeTo(self.transport)
    request.stopWriting()
    self.assertEqual(len(self.flushLoggedErrors(ArbitraryException)), 1)
