From adc3400bd0c3087a367932dec3dbf04c1e003058 Mon Sep 17 00:00:00 2001 From: rafie Date: Sun, 19 Feb 2023 15:38:06 +0200 Subject: [PATCH 1/3] Allow connection to be specified for cmd --- RLTest/env.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RLTest/env.py b/RLTest/env.py index 0251008..3c20df9 100644 --- a/RLTest/env.py +++ b/RLTest/env.py @@ -452,7 +452,8 @@ def expect(self, *query, **options): return Query(self, *query, **options) def cmd(self, *query, **options): - res = self.con.execute_command(*query, **options) + conn = options.pop('conn', self.con) + res = conn.execute_command(*query, **options) self.debugPrint('query: %s, result: %s' % (repr(query), repr(res))) return res From a7d11af936d55693b0ab756eea62659491208a29 Mon Sep 17 00:00:00 2001 From: rafie Date: Sun, 19 Feb 2023 15:38:31 +0200 Subject: [PATCH 2/3] Raise exception when failing to start Env --- RLTest/redis_std.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RLTest/redis_std.py b/RLTest/redis_std.py index 51b9f91..d0999f4 100644 --- a/RLTest/redis_std.py +++ b/RLTest/redis_std.py @@ -332,6 +332,8 @@ def startEnv(self, masters = True, slaves = True): self.envIsUp = self.masterProcess is not None or self.slaveProcess is not None self.envIsHealthy = self.masterProcess is not None and (self.slaveProcess is not None if self.useSlaves else True) + if not self.envIsUp or not self.envIsHealthy: + raise Exception('Failed to start environment') def _isAlive(self, process): if not process: From cfcb98ff7e447bb1c877fa9c40fcaca39c64ea73 Mon Sep 17 00:00:00 2001 From: rafie Date: Sun, 19 Feb 2023 15:38:54 +0200 Subject: [PATCH 3/3] Version 0.5.13 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5036b15..3fb2488 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "RLTest" -version = "0.5.12" +version = "0.5.13" description="Redis Labs Test Framework, allow to run tests on redis and modules on a variety of environments" authors = ["RedisLabs "] license = "BSD-3-Clause"