<commit_before>import logging

import xmlrpclib

from fuelweb_test.integration.base import Base
from fuelweb_test.helpers import SSHClient


class TestNailyd(Base):
    def __init__(self, *args, **kwargs):
        super(TestNailyd, self).__init__(*args, **kwargs)
        self.remote = SSHClient()

    def setUp(self):
        logging.info('Admin node ip: %s' % self.get_admin_node_ip())
        self.ip = self.get_admin_node_ip()

    def tearDown(self):
        pass

    def test_nailyd_alive(self):
        self.remote.connect_ssh(self.ip, 'root', 'r00tme')
        ps_output = self.remote.execute('ps ax')['stdout']
        naily_processes = filter(lambda x: '/usr/bin/nailyd' in x, ps_output)
        logging.debug("Found naily processes: %s" % naily_processes)
        self.assertEquals(len(naily_processes), 1)<commit_msg>[integr.test] Fix process names in test_nailyd_alive<commit_after>import logging

import xmlrpclib

from fuelweb_test.integration.base import Base
from fuelweb_test.helpers import SSHClient


class TestNailyd(Base):
    def __init__(self, *args, **kwargs):
        super(TestNailyd, self).__init__(*args, **kwargs)
        self.remote = SSHClient()

    def setUp(self):
        logging.info('Admin node ip: %s' % self.get_admin_node_ip())
        self.ip = self.get_admin_node_ip()

    def tearDown(self):
        pass

    def test_nailyd_alive(self):
        self.remote.connect_ssh(self.ip, 'root', 'r00tme')
        ps_output = self.remote.execute('ps ax')['stdout']
        naily_processes = filter(lambda x: 'naily master' in x, ps_output)
        logging.debug("Found %d naily master processes: %s" %
                      (len(naily_processes), naily_processes))
        self.assertEqual(1, len(naily_processes))
        naily_processes = filter(lambda x: 'naily worker' in x, ps_output)
        logging.debug("Found %d naily worker processes: %s" %
                      (len(naily_processes), naily_processes))
        self.assertEqual(True, len(naily_processes) > 1)
{'fraction_non_alphanumeric': 0.11840796019900497, 'fraction_numerical': 0.003482587064676617, 'mean_word_length': 3.297008547008547, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5756883', 'n_tokens_mistral': 672, 'n_tokens_neox': 653, 'n_words': 141}