def setup_module(): """ We need some custom setup for this module. All unit tests in this module require protocol >=4. We won't bother going through the setup required unless that is the protocol version we are using. """ # If we aren't at protocol v 4 or greater don't waste time setting anything up, all tests will be skipped if PROTOCOL_VERSION >= 4: use_singledc(start=False) ccm_cluster = get_cluster() ccm_cluster.stop() config_options = {'tombstone_failure_threshold': 2000, 'tombstone_warn_threshold': 1000} ccm_cluster.set_configuration_options(config_options) ccm_cluster.start(wait_for_binary_proto=True, wait_other_notice=True) setup_keyspace()
def setup_module(): """ We need some custom setup for this module. All unit tests in this module require protocol >=4. We won't bother going through the setup required unless that is the protocol version we are using. """ # If we aren't at protocol v 4 or greater don't waste time setting anything up, all tests will be skipped if PROTOCOL_VERSION >= 4: use_singledc(start=False) ccm_cluster = get_cluster() ccm_cluster.stop() config_options = { 'tombstone_failure_threshold': 2000, 'tombstone_warn_threshold': 1000 } ccm_cluster.set_configuration_options(config_options) ccm_cluster.start(wait_for_binary_proto=True, wait_other_notice=True) setup_keyspace()
def setup_module(): """ We need some custom setup for this module. All unit tests in this module require protocol >=4. We won't bother going through the setup required unless that is the protocol version we are using. """ # If we aren't at protocol v 4 or greater don't waste time setting anything up, all tests will be skipped if PROTOCOL_VERSION >= 4: # Don't start the ccm cluster until we get the custom jvm argument specified use_singledc(start=False) ccm_cluster = get_cluster() # if needed stop CCM cluster ccm_cluster.stop() # This will enable the Mirroring query handler which will echo our custom payload k,v pairs back to us jmv_args = [ " -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"] ccm_cluster.start(wait_for_binary_proto=True, wait_other_notice=True, jvm_args=jmv_args) # wait for nodes to startup setup_keyspace()
def _upgrade_step_setup(self): """ This is not the regular _setUp method because it will be called from the decorator instead of letting nose handle it. This setup method will start a cluster with the right version according to the variable UPGRADE_PATH. """ remove_cluster() self.cluster = use_cluster(UPGRADE_CLUSTER_NAME + self.UPGRADE_PATH.name, [3], ccm_options=self.UPGRADE_PATH.starting_version, set_keyspace=self.set_keyspace, configuration_options=self.UPGRADE_PATH.configuration_options) self.nodes = self.cluster.nodelist() self.last_node_upgraded = None self.upgrade_done = Event() self.upgrade_thread = None if self.start_cluster: setup_keyspace() self.cluster_driver = Cluster() self.session = self.cluster_driver.connect() self.logger_handler.reset()