'The connection timeout does not take effect during fetches.'

def test_longFetchDoesntTimeout(self):

    c = Clock()
    SlowMailbox.callLater = c.callLater
    SlowMailbox.fetchDeferred = defer.Deferred()
    self.server.callLater = c.callLater
    SimpleServer.theAccount.mailboxFactory = SlowMailbox
    SimpleServer.theAccount.addMailbox('mailbox-test')
    self.server.setTimeout(1)
    def login():
        return self.client.login('testuser', 'password-test')
    def select():
        self.server.setTimeout(1)
        return self.client.select('mailbox-test')
    def fetch():
        return self.client.fetchUID('1:*')
    def stillConnected():
        self.assertNotEqual(self.server.state, 'timeout')
    def cbAdvance(ignored):
        for i in range(4):
            c.advance(0.5)
    SlowMailbox.fetchDeferred.addCallback(cbAdvance)
    d1 = self.connected.addCallback(strip(login))
    d1.addCallback(strip(select))
    d1.addCallback(strip(fetch))
    d1.addCallback(strip(stillConnected))
    d1.addCallback(self._cbStopClient)
    d1.addErrback(self._ebGeneral)
    d = defer.gatherResults([d1, self.loopback()])
    return d
