Skip to content

Commit

Permalink
Fix for pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gndcshv committed Oct 26, 2023
1 parent 395a602 commit 12846d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def default_desires(user_desires, extra_model_arguments: Dict[str, Any]):
confidence=0.98,
),
),
# Most latency sensitive Elasticsearch clusters are in the < 100GiB range
# Most latency sensitive Elasticsearch clusters are in the <100GiB range
data_shape=DataShape(
estimated_state_size_gib=Interval(
low=10, mid=100, high=1000, confidence=0.98
Expand Down
20 changes: 15 additions & 5 deletions tests/netflix/test_elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,24 @@ def test_es_simple_certain():
assert plan, "One or more plans is empty"
assert plan.candidate_clusters, "candidate_clusters is empty"
assert plan.candidate_clusters.zonal, "candidate_clusters.zonal is empty"
assert len(plan.candidate_clusters.zonal) == 9, "len(candidate_clusters.zonal) != 9"
assert (
len(plan.candidate_clusters.zonal) == 9
), "len(candidate_clusters.zonal) != 9"

cluster_type_counts = Counter(zone.cluster_type for zone in plan.candidate_clusters.zonal)
cluster_type_counts = Counter(
zone.cluster_type for zone in plan.candidate_clusters.zonal
)

assert len(cluster_type_counts) == 3, "Expecting 3 cluster types"
assert cluster_type_counts["elasticsearch-search"] == 3, "Expecting exactly 3 search nodes"
assert cluster_type_counts["elasticsearch-master"] == 3, "Expecting exactly 3 master nodes"
assert cluster_type_counts["elasticsearch-data"] >= 3, "Expecting at least 3 data nodes"
assert (
cluster_type_counts["elasticsearch-search"] == 3
), "Expecting exactly 3 search nodes"
assert (
cluster_type_counts["elasticsearch-master"] == 3
), "Expecting exactly 3 master nodes"
assert (
cluster_type_counts["elasticsearch-data"] >= 3
), "Expecting at least 3 data nodes"


def zonal_summary(zlr):
Expand Down

0 comments on commit 12846d7

Please sign in to comment.