<commit_before>import logging

from unittest.case import TestCase

from integration import ci
from helpers import HTTPClient, SSHClient
logging.basicConfig(format=':%(lineno)d: %(asctime)s %(message)s',
                    level=logging.DEBUG)


class Base(TestCase):
    @classmethod
    def setUpClass(cls):
        logging.info("Waiting while bootstrapping is in progress")
        ssh = SSHClient()
        logpath = "/var/log/puppet/firstboot.log"
        str_success = "Finished catalog run"

        ssh.connect_ssh(str(ci.environment.node['admin'].ip_address), "root", "r00tme")
        count = 0
        while True:
            res = ssh.execute("grep '%s' '%s'" % (str_success, logpath))
            count += 1
            if not res['exit_status']:
                break
            sleep(5)
            if count == 200:
                raise Exception("Admin node bootstrapping has not finished or failed. \
                                 Check %s manually." % logpath)
        ssh.disconnect()
<commit_msg>[integr test] Added forgotten import time<commit_after>import logging
import time

from unittest.case import TestCase

from integration import ci
from helpers import HTTPClient, SSHClient
logging.basicConfig(format=':%(lineno)d: %(asctime)s %(message)s',
                    level=logging.DEBUG)


class Base(TestCase):
    @classmethod
    def setUpClass(cls):
        logging.info("Waiting while bootstrapping is in progress")
        ssh = SSHClient()
        logpath = "/var/log/puppet/firstboot.log"
        str_success = "Finished catalog run"

        ssh.connect_ssh(str(ci.environment.node['admin'].ip_address), "root", "r00tme")
        count = 0
        while True:
            res = ssh.execute("grep '%s' '%s'" % (str_success, logpath))
            count += 1
            if not res['exit_status']:
                break
            time.sleep(5)
            if count == 200:
                raise Exception("Admin node bootstrapping has not finished or failed. \
                                 Check %s manually." % logpath)
        ssh.disconnect()

{'fraction_non_alphanumeric': 0.10781025395304264, 'fraction_numerical': 0.007666506947771922, 'mean_word_length': 2.1684370257966616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3592936', 'n_tokens_mistral': 616, 'n_tokens_neox': 575, 'n_words': 157}