<commit_before>import os
import time
from re import findall
from unittest import skip

from cassandra import ConsistencyLevel
from nose.plugins.attrib import attr

from assertions import assert_almost_equal, assert_one
from ccmlib.node import Node
from dtest import Tester, debug
from tools import insert_c1c2, since


@since('2.1')
class TestIncRepair(Tester):

    def __init__(self, *args, **kwargs):
        kwargs['cluster_options'] = {'start_rpc': 'true'}
        # Ignore these log patterns:
        self.ignore_log_patterns = [
            r'Can\'t send migration request: node.*is down',
        ]
        Tester.__init__(self, *args, **kwargs)

    def sstable_marking_test(self):
        cluster = self.cluster
        cluster.populate(3).start()
        node1, node2, node3 = cluster.nodelist()

        node3.stop(gently=True)

        node1.stress(['write', 'n=10000', '-schema', 'replication(factor=3)'])
        node1.flush()<commit_msg>Disable hinted handoff to prevent unintended SSTable<commit_after>import os
import time
from re import findall
from unittest import skip

from cassandra import ConsistencyLevel
from nose.plugins.attrib import attr

from assertions import assert_almost_equal, assert_one
from ccmlib.node import Node
from dtest import Tester, debug
from tools import insert_c1c2, since


@since('2.1')
class TestIncRepair(Tester):

    def __init__(self, *args, **kwargs):
        kwargs['cluster_options'] = {'start_rpc': 'true'}
        # Ignore these log patterns:
        self.ignore_log_patterns = [
            r'Can\'t send migration request: node.*is down',
        ]
        Tester.__init__(self, *args, **kwargs)

    def sstable_marking_test(self):
        cluster = self.cluster
        # hinted handoff can create SSTable that we don't need after node3 restarted
        cluster.set_configuration_options(values={'hinted_handoff_enabled': False})
        cluster.populate(3).start()
        node1, node2, node3 = cluster.nodelist()

        node3.stop(gently=True)

        node1.stress(['write', 'n=10000', '-schema', 'replication(factor=3)'])
        node1.flush()
{'fraction_non_alphanumeric': 0.10454115421002838, 'fraction_numerical': 0.016556291390728478, 'mean_word_length': 3.4904458598726116, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2729877', 'n_tokens_mistral': 660, 'n_tokens_neox': 623, 'n_words': 175}