Skip to content

Commit 980cc0a

Browse files
committed
fix: add_unit issue
1 parent ec03785 commit 980cc0a

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

tests/integration/test_balancer.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def test_relate_not_enough_brokers(self, juju: jubilant.Juju):
126126

127127
@pytest.mark.abort_on_fail
128128
def test_minimum_brokers_balancer_starts(self, juju: jubilant.Juju):
129-
juju.add_units(APP_NAME, num_units=2)
129+
juju.add_unit(APP_NAME, num_units=2)
130130
time.sleep(60)
131131

132132
juju.wait(
@@ -154,7 +154,7 @@ def test_balancer_monitor_state(self, juju: jubilant.Juju):
154154
deployment_strat == "single", reason="Testing full rebalance on large deployment"
155155
)
156156
def test_add_unit_full_rebalance(self, juju: jubilant.Juju):
157-
juju.add_units(APP_NAME, num_units=1) # up to 4, new unit won't have any partitions
157+
juju.add_unit(APP_NAME, num_units=1) # up to 4, new unit won't have any partitions
158158
time.sleep(60)
159159

160160
juju.wait(
@@ -191,7 +191,7 @@ def test_add_unit_full_rebalance(self, juju: jubilant.Juju):
191191
)
192192
def test_add_unit_targeted_rebalance(self, juju: jubilant.Juju):
193193
assert balancer_is_ready(juju=juju, app_name=self.balancer_app)
194-
juju.add_units(APP_NAME, num_units=1) # up to 4, new unit won't have any partitions
194+
juju.add_unit(APP_NAME, num_units=1) # up to 4, new unit won't have any partitions
195195
time.sleep(60)
196196

197197
juju.wait(
@@ -292,9 +292,7 @@ def test_tls(self, juju: jubilant.Juju):
292292
juju.integrate(TLS_NAME, f"{self.balancer_app}:{INTERNAL_TLS_RELATION}")
293293

294294
juju.wait(
295-
lambda status: all_active_idle(
296-
status, *list({APP_NAME, CONTROLLER_NAME, TLS_NAME})
297-
),
295+
lambda status: all_active_idle(status, *list({APP_NAME, CONTROLLER_NAME, TLS_NAME})),
298296
delay=3,
299297
successes=10,
300298
timeout=3600,

tests/integration/test_tls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def test_certificate_transfer(juju: jubilant.Juju, kafka_apps):
311311
@pytest.mark.abort_on_fail
312312
def test_kafka_tls_scaling(juju: jubilant.Juju, kafka_apps):
313313
"""Scale the application while using TLS to check that new units will configure correctly."""
314-
juju.add_units(APP_NAME, num_units=2)
314+
juju.add_unit(APP_NAME, num_units=2)
315315
time.sleep(60)
316316

317317
# Wait for model to settle

0 commit comments

Comments
 (0)