Skip to content

Commit f88d490

Browse files
Test
1 parent 5e5c563 commit f88d490

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

src/mysql_vm_helpers.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import shutil
1212
import subprocess
1313
import tempfile
14+
import time
1415
import typing
1516
from collections.abc import Iterable
1617
from typing import Any
@@ -195,13 +196,6 @@ def install_and_configure_mysql_dependencies() -> None:
195196
["/snap/bin/charmed-mysql.mysqlsh", "--help"], stderr=subprocess.PIPE
196197
)
197198

198-
# fix ownership necessary for upgrades from 8/stable@r151
199-
# TODO: remove once snap post-refresh fixes the permission
200-
if common_path.owner() != MYSQL_SYSTEM_USER:
201-
logger.debug("Updating charmed-mysql common directory ownership")
202-
# Parameters are generated by the charm
203-
os.system(f"chown -R {MYSQL_SYSTEM_USER} {CHARMED_MYSQL_COMMON_DIRECTORY}") # noqa: S605
204-
205199
for alias in [
206200
"mysql",
207201
"mysqlrouter",
@@ -433,9 +427,9 @@ def wait_until_mysql_connection(self, check_port: bool = True) -> None:
433427
Retry every 5 seconds for 120 seconds if there is an issue obtaining a connection.
434428
"""
435429
logger.debug("Waiting for MySQL connection")
436-
437-
if not os.path.exists(MYSQLD_SOCK_FILE):
438-
raise MySQLServiceNotRunningError("MySQL socket file not found")
430+
time.sleep(60)
431+
# if not os.path.exists(MYSQLD_SOCK_FILE):
432+
# raise MySQLServiceNotRunningError("MySQL socket file not found")
439433

440434
if check_port and not self.check_mysqlcli_connection():
441435
raise MySQLServiceNotRunningError("Connection with mysqlcli not possible")

tests/integration/high_availability/test_upgrade_rollback_incompat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,11 @@ async def test_rollback(juju: Juju, charm: str, continuous_writes) -> None:
159159
mysql_leader = get_app_leader(juju, MYSQL_APP_NAME)
160160
local_charm = get_locally_built_charm(charm)
161161

162-
time.sleep(10)
163-
164162
logging.info("Run pre-upgrade-check action")
165163
task = juju.run(unit=mysql_leader, action="pre-upgrade-check")
166164
task.raise_on_failure()
167165

168-
time.sleep(20)
166+
time.sleep(60)
169167

170168
logging.info("Refresh with previous charm")
171169
juju.refresh(app=MYSQL_APP_NAME, path=local_charm)

0 commit comments

Comments
 (0)