'If L{IUNIXTransport.sendFileDescriptor} is used to queue a greater
number of file descriptors than the number of bytes sent using
L{ITransport.write}, the connection is closed and the protocol connected
to the transport has its C{connectionLost} method called with a failure
wrapping L{FileDescriptorOverrun}.'

def test_fileDescriptorOverrun(self):

    cargo = socket()
    server = SendFileDescriptor(cargo.fileno(), None)
    client = ReceiveFileDescriptor()
    result = []
    d = client.waitForDescriptor()
    d.addBoth(result.append)
    d.addBoth((lambda ignored: server.transport.loseConnection()))
    runProtocolsWithReactor(self, server, client, self.endpoints)
    self.assertIsInstance(result[0], Failure)
    result[0].trap(ConnectionClosed)
    self.assertIsInstance(server.reason.value, FileDescriptorOverrun)
