Skip to content

Commit

Permalink
IGNITE-15270 Fix rebalance test (apache#9306)
Browse files Browse the repository at this point in the history
  • Loading branch information
map7000 authored Aug 12, 2021
1 parent a8f0ebe commit c7a835f
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,17 @@ def test_node_join(self, ignite_version, backups, cache_count, entry_count, entr

await_and_check_rebalance(new_node)

control_utility.deactivate()

nodes = ignites.nodes.copy()

nodes.append(new_node.nodes[0])

result = get_result(new_node.nodes, preload_time, cache_count, entry_count, entry_size)

control_utility.deactivate()

self.logger.debug(f'DB size after rebalance: {get_database_size_mb(nodes, ignites.database_dir)}')

return get_result(new_node.nodes, preload_time, cache_count, entry_count, entry_size)
return result

# pylint: disable=too-many-arguments, too-many-locals
@cluster(num_nodes=NUM_NODES)
Expand Down Expand Up @@ -118,11 +120,13 @@ def test_node_left(self, ignite_version, backups, cache_count, entry_count, entr

await_and_check_rebalance(ignites)

result = get_result(ignites.nodes[:-1], preload_time, cache_count, entry_count, entry_size)

control_utility.deactivate()

self.logger.debug(f'DB size after rebalance: {get_database_size_mb(ignites.nodes, ignites.database_dir)}')

return get_result(ignites.nodes[:-1], preload_time, cache_count, entry_count, entry_size)
return result

@cluster(num_nodes=NUM_NODES)
@ignite_versions(str(DEV_BRANCH), str(LATEST))
Expand Down Expand Up @@ -186,11 +190,13 @@ def node_join_historical_test(self, ignite_version, backups, cache_count, entry_

await_and_check_rebalance(ignites, rebalance_nodes, False)

result = get_result(rebalance_nodes, preload_time, cache_count, entry_count, entry_size)

control_utility.deactivate()

self.logger.debug(f'DB size after rebalance: {get_database_size_mb(ignites.nodes, ignites.database_dir)}')

return get_result(rebalance_nodes, preload_time, cache_count, entry_count, entry_size)
return result


def await_and_check_rebalance(service: IgniteService, rebalance_nodes: list = None, is_full: bool = True):
Expand Down

0 comments on commit c7a835f

Please sign in to comment.