'Clean up any ZNodes created during the test'

def teardown_zookeeper(self):

    if (not self.cluster[0].running):
        self.cluster.start()
    tries = 0
    if (self.client and self.client.connected):
        while (tries < 3):
            try:
                self.client.retry(self.client.delete, '/', recursive=True)
                break
            except NotEmptyError:
                pass
            tries += 1
        self.client.stop()
        self.client.close()
        del self.client
    else:
        client = self._get_client()
        client.start()
        client.retry(client.delete, '/', recursive=True)
        client.stop()
        client.close()
        del client
    for client in self._clients:
        client.stop()
        del client
    self._clients = None
