Skip to content

Commit 8df075e

Browse files
committed
Revert "feat: remove app timeout"
This reverts commit 6a2a7ab.
1 parent 6a2a7ab commit 8df075e

2 files changed

Lines changed: 2 additions & 23 deletions

File tree

juju/model.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,15 +1000,7 @@ async def remove_storage(self, *storage_ids, force=False, destroy_storage=False)
10001000
if ret.results[0].error:
10011001
raise JujuError(ret.results[0].error.message)
10021002

1003-
async def remove_application(
1004-
self,
1005-
app_name,
1006-
block_until_done=False,
1007-
force=False,
1008-
destroy_storage=False,
1009-
no_wait=False,
1010-
timeout=None
1011-
):
1003+
async def remove_application(self, app_name, block_until_done=False, force=False, destroy_storage=False, no_wait=False):
10121004
"""Removes the given application from the model.
10131005
10141006
:param str app_name: Name of the application
@@ -1017,8 +1009,6 @@ async def remove_application(
10171009
:param bool no_wait: Rush through application removal without waiting for each individual step to complete (=false)
10181010
:param bool block_until_done: Ensure the app is removed from the
10191011
model when returned
1020-
:param int timeout: Raise asyncio.exceptions.TimeoutError if the application is not removed
1021-
within the timeout period.
10221012
"""
10231013
if app_name not in self.applications:
10241014
raise JujuError("Given application doesn't seem to appear in the\
@@ -1029,7 +1019,7 @@ async def remove_application(
10291019
no_wait=no_wait,
10301020
)
10311021
if block_until_done:
1032-
await self.block_until(lambda: app_name not in self.applications, timeout=timeout)
1022+
await self.block_until(lambda: app_name not in self.applications)
10331023

10341024
async def block_until(self, *conditions, timeout=None, wait_period=0.5):
10351025
"""Return only after all conditions are true.

tests/integration/test_application.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import logging
55
from pathlib import Path
6-
import asyncio
76

87
import pytest
98

@@ -327,16 +326,6 @@ async def test_app_remove_wait_flag():
327326
assert a_name not in model.applications
328327

329328

330-
@base.bootstrapped
331-
async def test_app_remove_timeout():
332-
async with base.CleanModel() as model:
333-
app = await model.deploy('ubuntu')
334-
await model.wait_for_idle(status="active")
335-
336-
with pytest.raises(asyncio.TimeoutError):
337-
await model.remove_application(app.name, block_until_done=True, timeout=1)
338-
339-
340329
@base.bootstrapped
341330
async def test_app_charm_name():
342331
async with base.CleanModel() as model:

0 commit comments

Comments
 (0)