def test_connect_to_either_namenode_exception_two_failed(self):
        """ With 2 failvers, test no connection, and no exception is raised. """
        self.suj.set_fail_n_next_connect(3)
        with self.assertRaises(HdfsConnectError):
            self.suj.connect_to_either_namenode(self.NAMENODES)
        self.assertEqual(0, self.suj.connect_attempted(HC.DEFAULT_NN))
        self.assertEqual(1, self.suj.connect_attempted(HC.WARP_TURTLE_NN1))
        self.assertEqual(1, self.suj.connect_attempted(HC.WARP_TURTLE_NN2))
 With 2 failvers, test no connection, and no exception is raised. 
petastorm/hdfs/tests/test_hdfs_namenode.py