Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flakey failure of the TestClusterRoutes in test_async_client script in tests #1122

Closed
avifenesh opened this issue Mar 14, 2024 · 0 comments
Closed
Assignees
Labels
bug Something isn't working python
Milestone

Comments

@avifenesh
Copy link
Contributor

Describe the bug

Test failure
Test if routed the request to the right place fails.
Should use a different way to make sure that the same address and myself are in the same line.

_ TestClusterRoutes.test_cluster_route_by_address_reaches_correct_node[ProtocolVersion.RESP3-True] _

self = <tests.test_async_client.TestClusterRoutes object at 0x7f6c229c52a0>
redis_client = <glide.redis_client.RedisClusterClient object at 0x7f6c23096ec0>

    @pytest.mark.parametrize("cluster_mode", [True])
    @pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
    async def test_cluster_route_by_address_reaches_correct_node(
        self, redis_client: RedisClusterClient
    ):
        cluster_nodes = await redis_client.custom_command(
            ["cluster", "nodes"], RandomNode()
        )
        assert isinstance(cluster_nodes, str)
        host = (
            [line for line in cluster_nodes.split("\n") if "myself" in line][0]
            .split(" ")[1]
            .split("@")[0]
        )
    
        second_result = await redis_client.custom_command(
            ["cluster", "nodes"], ByAddressRoute(host)
        )
    
>       assert cluster_nodes == second_result
E       AssertionError: assert '8ed15429c413...cted 0-5460\n' == '8ed15429c413...cted 0-5460\n'
E         Skipping 609 identical leading characters in diff, use -v to show
E         -  1710333254373 2 connected
E         ?           ^^^^
E         +  1710333251000 2 connected
E         ?           ^^^^
E         - f06a01[36](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:37)159fbb2efd2e06bcca[38](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:39)b80eeba1eece 127.0.0.1:15027@25027 myself,master - 0 1710333253000 1 connected 0-5[46](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:47)0
E         ?                                                                                           ^
E         + f06a0136159fbb2efd2e06bcca38b80eeba1eece 127.0.0.1:1[50](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:51)27@25027 myself,master - 0 17103332[52](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:53)000 1 connected 0-[54](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:55)[60](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:61)
E         ?                                                                                           ^

test_async_client.py:1[67](https://github.com/aws/glide-for-redis/actions/runs/8264652118/job/22608709130#step:12:68)7: AssertionError

Expected Behavior

E + 1710333251000 2 connected

Current Behavior

E - 1710333254373 2 connected

Reproduction Steps

Flaky

Possible Solution

No response

Additional Information/Context

No response

Client version used

Latest

Redis Version

6.2.14

OS

ubuntu-latest (6.2.14)

Language

Python

Language Version

Python 3.10

Cluster information

No response

Logs

No response

Other information

No response

@avifenesh avifenesh added bug Something isn't working python labels Mar 14, 2024
@avifenesh avifenesh added this to the GA milestone Mar 14, 2024
@shachlanAmazon shachlanAmazon self-assigned this Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python
Projects
None yet
Development

No branches or pull requests

3 participants