diff --git a/redis/commands/core.py b/redis/commands/core.py index 73003e7fb6..0bf056861a 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -1069,6 +1069,15 @@ def wait(self, num_replicas, timeout, **kwargs): """ return self.execute_command("WAIT", num_replicas, timeout, **kwargs) + def failover(self): + """ + This function throws a NotImplementedError since it is intentionally + not supported. + """ + raise NotImplementedError( + "FAILOVER is intentionally not implemented in the client." + ) + class BasicKeyCommands: """ diff --git a/tests/test_commands.py b/tests/test_commands.py index b28b63ea6e..723f99a205 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -636,6 +636,11 @@ def test_config_set(self, r): assert r.config_set("timeout", 0) assert r.config_get()["timeout"] == "0" + @skip_if_server_version_lt("6.0.0") + def test_failover(self, r): + with pytest.raises(NotImplementedError): + r.failover() + @pytest.mark.onlynoncluster def test_dbsize(self, r): r["a"] = "foo"