From 833e9aa802aae10c102f3f36ddf3196c03e92e8e Mon Sep 17 00:00:00 2001 From: Jonathan Louie Date: Wed, 8 Jan 2025 09:52:18 -0800 Subject: [PATCH] Update Python tests to avoid immutable config error Signed-off-by: Jonathan Louie --- python/python/tests/test_async_client.py | 12 ++++++------ python/python/tests/test_transaction.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/python/python/tests/test_async_client.py b/python/python/tests/test_async_client.py index 28a61d6a65..cb66ac5901 100644 --- a/python/python/tests/test_async_client.py +++ b/python/python/tests/test_async_client.py @@ -857,9 +857,9 @@ async def test_config_get_set(self, glide_client: TGlideClient): if not await check_if_server_version_lt(glide_client, "7.0.0"): previous_timeout = await glide_client.config_get(["timeout"]) - previous_logfile = await glide_client.config_get(["logfile"]) + previous_node_cluster_timeout = await glide_client.config_get(["node-cluster-timeout"]) assert ( - await glide_client.config_set({"timeout": "1000", "logfile": "foo"}) + await glide_client.config_set({"timeout": "1000", "node-cluster-timeout": "16000"}) == OK ) assert await glide_client.config_get(["timeout", "logfile"]) == { @@ -868,16 +868,16 @@ async def test_config_get_set(self, glide_client: TGlideClient): } # revert changes to previous timeout previous_timeout_decoded = convert_bytes_to_string_object(previous_timeout) - previous_logfile_decoded = convert_bytes_to_string_object(previous_logfile) + previous_node_cluster_timeout_decoded = convert_bytes_to_string_object(pprevious_node_cluster_timeout) assert isinstance(previous_timeout_decoded, dict) - assert isinstance(previous_logfile_decoded, dict) + assert isinstance(previous_node_cluster_timeout_decoded, dict) assert isinstance(previous_timeout_decoded["timeout"], str) - assert isinstance(previous_logfile_decoded["logfile"], str) + assert isinstance(previous_node_cluster_timeout_decoded["node-cluster-timeout"], str) assert ( await glide_client.config_set( { "timeout": previous_timeout_decoded["timeout"], - "logfile": previous_logfile_decoded["logfile"], + "node-cluster-timeout": previous_node_cluster_timeout_decoded["node-cluster-timeout"], } ) == OK diff --git a/python/python/tests/test_transaction.py b/python/python/tests/test_transaction.py index b947a5cb4e..fe0033c9b4 100644 --- a/python/python/tests/test_transaction.py +++ b/python/python/tests/test_transaction.py @@ -272,10 +272,10 @@ async def transaction_test( transaction.config_get(["timeout"]) args.append({b"timeout": b"1000"}) if not await check_if_server_version_lt(glide_client, "7.0.0"): - transaction.config_set({"timeout": "2000", "logfile": "foo"}) + transaction.config_set({"timeout": "2000", "cluster-node-timeout": "16000"}) args.append(OK) - transaction.config_get(["timeout", "logfile"]) - args.append({b"timeout": b"2000", b"logfile": b"foo"}) + transaction.config_get(["timeout", "cluster-node-timeout"]) + args.append({b"timeout": b"2000", b"cluster-node-timeout": b"16000"}) transaction.hset(key4, {key: value, key2: value2}) args.append(2)