'Trigger and ensure connection_errors are counted
Stop all node with the driver knowing about the "DOWN" states.'

def test_connection_error(self):

    for i in range(0, 100):
        self.session.execute_async('INSERT    INTO    test    (k,    v)    VALUES    ({0},    {1})'.format(i, i))
    get_cluster().stop(wait=True, gently=False)
    try:
        query = SimpleStatement('SELECT    *    FROM    test', consistency_level=ConsistencyLevel.ALL)
        with self.assertRaises(NoHostAvailable):
            self.session.execute(query)
    finally:
        get_cluster().start(wait_for_binary_proto=True, wait_other_notice=True)
        time.sleep(5)
    self.assertGreater(self.cluster.metrics.stats.connection_errors, 0)
