def test_sim(self): version, ignite = self.start_ignite_grid(True) ignite.jmx.start_utility() client_config = Ignite.config_builder.get_config( 'client', config_set_name='base') group_names = PiClientIgniteUtils.collect_cache_group_names( ignite, client_config) PiClientIgniteUtils.load_data_with_streamer(ignite, client_config, end_key=50) server_nodes_num = ignite.get_nodes_num('server') sim_engine = PigeonSimulation(server_nodes_num) for running_iteration in range(1, DEFAULT_ITERATIONS + 1): log_print("Running iteration %s" % running_iteration) ev, node = sim_engine.next_event() log_print("Evaluating event %s on node %s" % (ev, node)) pigeon = self.get_pigeon(ignite, node) pigeon[ev]() ignite.jmx.wait_for_finish_rebalance(120, group_names) self.verify_cluster(ignite) ignite.jmx.kill_utility()
def setup_testcase(self): self.logger.info('TestSetup is called') if self.get_context_variable('zookeeper_enabled'): self.start_zookeeper() self.ignite.set_activation_timeout(240) self.ignite.set_snapshot_timeout(240) self.su.clear_snapshots_list() self.start_grid(activate_on_particular_node=1) PiClientIgniteUtils.load_data_with_streamer(self.ignite, self.get_client_config(), end_key=1000) if self.get_context_variable( 'pitr_enabled') and self.get_context_variable( 'snapshots_enabled'): self.su.wait_no_snapshots_activity_in_cluster() self.group_names = PiClientIgniteUtils.collect_cache_group_names( self.ignite, self.get_client_config()) # if not self.ignite.jmx.is_started(): # self.ignite.jmx.start_utility() # wait for no client on cluster self.ignite.wait_for_topology_snapshot(client_num=0) print_debug(repr(self.ignite))
def _wait_cluster_ready(self): if self.get_context_variable( 'pitr_enabled') and self.get_context_variable( 'snapshots_enabled'): self.su.wait_no_snapshots_activity_in_cluster() self.group_names = PiClientIgniteUtils.collect_cache_group_names( self.ignite, self.get_client_config()) if not self.ignite.jmx.is_started(): self.ignite.jmx.start_utility() # wait for no client on cluster self.ignite.wait_for_topology_snapshot(client_num=0) if is_enabled(self.config.get('disable_baseline_autoadjustment')): log_print("Going to disable baseline autoadjustment", color='green') if self.cu.is_baseline_autoajustment_supported(): self.cu.disable_baseline_autoajustment() log_print("Baseline autoadjustment disabled", color='green') log_print(repr(self.ignite), color='debug')