Skip to content

Commit

Permalink
Decrease Warnings in the CI (#2703)
Browse files Browse the repository at this point in the history
==============================================
Signed-off-by: Muhammad Awawdi <[email protected]>
  • Loading branch information
Muhammad-awawdi-amazon authored Nov 21, 2024
1 parent 34afc93 commit b8ccf86
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/python/tests/test_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ async def test_send_and_receive_large_values(self, request, cluster_mode, protoc
assert len(value) == length
await glide_client.set(key, value)
assert await glide_client.get(key) == value.encode()
await glide_client.close()

@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
Expand Down Expand Up @@ -202,6 +203,8 @@ async def test_can_connect_with_auth_requirepass(
key = get_random_string(10)
assert await auth_client.set(key, key) == OK
assert await auth_client.get(key) == key.encode()
await auth_client.close()

finally:
# Reset the password
auth_client = await create_client(
Expand All @@ -211,6 +214,7 @@ async def test_can_connect_with_auth_requirepass(
addresses=glide_client.config.addresses,
)
await auth_client.custom_command(["CONFIG", "SET", "requirepass", ""])
await auth_client.close()

@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
Expand Down Expand Up @@ -254,6 +258,7 @@ async def test_can_connect_with_auth_acl(
# This client isn't authorized to perform SET
await testuser_client.set("foo", "bar")
assert "NOPERM" in str(e)
await testuser_client.close()
finally:
# Delete this user
await glide_client.custom_command(["ACL", "DELUSER", username])
Expand All @@ -265,6 +270,7 @@ async def test_select_standalone_database_id(self, request, cluster_mode):
)
client_info = await glide_client.custom_command(["CLIENT", "INFO"])
assert b"db=4" in client_info
await glide_client.close()

@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
Expand All @@ -277,6 +283,7 @@ async def test_client_name(self, request, cluster_mode, protocol):
)
client_info = await glide_client.custom_command(["CLIENT", "INFO"])
assert b"name=TEST_CLIENT_NAME" in client_info
await glide_client.close()

@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
Expand Down Expand Up @@ -8482,6 +8489,7 @@ async def wait_and_function_kill():
with pytest.raises(RequestError) as e:
assert await glide_client.function_kill()
assert "NotBusy" in str(e)
await test_client.close()

@pytest.mark.parametrize("cluster_mode", [False, True])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
Expand Down Expand Up @@ -8532,6 +8540,7 @@ async def wait_and_function_kill():
endless_fcall_route_call(),
wait_and_function_kill(),
)
await test_client.close()

@pytest.mark.parametrize("cluster_mode", [True])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
Expand Down

0 comments on commit b8ccf86

Please sign in to comment.