'The deferred returned by L{client.Resolver.queryTCP} will
errback when the TCP connection attempt fails. The reason for
the connection failure is passed as the argument to errback.'

def test_singleTCPQueryErrbackOnConnectionFailure(self):

    reactor = proto_helpers.MemoryReactor()
    resolver = client.Resolver(servers=[('192.0.2.100', 53)], reactor=reactor)
    d = resolver.queryTCP(dns.Query('example.com'))
    (host, port, factory, timeout, bindAddress) = reactor.tcpClients[0]
    class SentinelException(Exception, ):
        pass
    factory.clientConnectionFailed(reactor.connectors[0], failure.Failure(SentinelException()))
    self.failureResultOf(d, SentinelException)
