Skip to content

Commit

Permalink
bugfix: Fix CI bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
suxb201 committed Dec 25, 2023
1 parent 4e467c2 commit 120fadc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/cases/aof.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def create_aof_dir(dir_path):
os.makedirs(dir_path, exist_ok=True)

def get_aof_file_relative_path():
if h.REDIS_SERVER_VERSION == 7.0:
if h.REDIS_SERVER_VERSION >= 7.0:
aof_file = "/appendonlydir/appendonly.aof.manifest"
else:
aof_file = "/appendonly.aof"
Expand Down
6 changes: 3 additions & 3 deletions tests/helpers/shake.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pybbt
import requests
import toml

from helpers.constant import PATH_REDIS_SHAKE
from helpers.redis import Redis
from helpers.utils.filesystem import create_empty_dir
Expand Down Expand Up @@ -50,7 +49,7 @@ def create_rdb_opts(rdb_path: str, dts: Redis) -> typing.Dict:
}
}
return d

@staticmethod
def create_aof_opts(aof_path: str, dts: Redis, timestamp: int = 0) -> typing.Dict:
d = {
Expand All @@ -62,6 +61,7 @@ def create_aof_opts(aof_path: str, dts: Redis, timestamp: int = 0) -> typing.Dic
}
return d


class Shake:
def __init__(self, opts: typing.Dict):
self.case_ctx = pybbt.get_case_context()
Expand Down Expand Up @@ -97,7 +97,7 @@ def _wait_start(self, timeout=5):
try:
self.get_status()
return
except requests.exceptions.ConnectionError:
except (requests.exceptions.ConnectionError, requests.exceptions.JSONDecodeError):
pass
if timer.elapsed() > timeout:
raise Exception(f"Shake server not started in {timeout} seconds")
Expand Down

0 comments on commit 120fadc

Please sign in to comment.