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

Add IT framework #63

Merged
merged 6 commits into from
Jan 26, 2024
Merged

Add IT framework #63

merged 6 commits into from
Jan 26, 2024

Conversation

Yury-Fridlyand
Copy link

@Yury-Fridlyand Yury-Fridlyand commented Jan 17, 2024

Based on #54/valkey-io#796

This starts redis in standalone mode on port 6380 in CI and a cluster on ports 7000-7006.
To connect to standalone use:

    var client =
        RedisClient.CreateClient(
                RedisClientConfiguration.builder()
                    .address(
                        NodeAddress.builder()
                            .port(TestConfiguration.STANDALONE_PORT)
                            .build())
                    .build())
            .get(10, TimeUnit.SECONDS);

To connect to cluster use:

    var clusterClient =
        ClusterClient.CreateClient(
                RedisClusterClientConfiguration.builder()
                    .address(
                        NodeAddress.builder()
                            .port(TestConfiguration.CLUSTER_PORT)
                            .build())
                    .requestTimeout(3000)
                    .build())
            .get(10, TimeUnit.SECONDS);

NOTE don't use Future::get without specifying a timeout, because it hangs IT/CI on an error!

Test can be started by

./gradlew :integTest:test

The test report is written to

integTest/build/reports/tests/test/index.html

Redis server logs are stored in

<repo root>/utils/clusters

until next test start

To start redis standalone instance IT uses

python3 <repo root>/utils/cluster_manager.py start -p 6380 -r 0

To start redis cluster

python3 <repo root>/utils/cluster_manager.py start --cluster-mode -p 8000 8001 8002 8003 8004 8005

To stop all

python3 <repo root>/utils/cluster_manager.py stop --prefix redis-cluster

Copy link

@acarbonetto acarbonetto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you planning to add an IT test to show it working?

@Yury-Fridlyand
Copy link
Author

On next PR or after rebasing on base commands PR + cluster client PR.
Currently I can't even add IT for basic client.

@Yury-Fridlyand Yury-Fridlyand marked this pull request as draft January 22, 2024 22:40
@Yury-Fridlyand Yury-Fridlyand marked this pull request as ready for review January 24, 2024 16:31
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand
Copy link
Author

Note: Python and Node CI fails on main too, I tested it on this commit: 15d9f4e

Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Yury-Fridlyand merged commit 242805d into java/integ_yuryf_it Jan 26, 2024
20 of 23 checks passed
@Yury-Fridlyand Yury-Fridlyand deleted the java/dev_yuryf_it branch January 26, 2024 18:26
@aaron-congo
Copy link

Small note on the PR description, it mentions the cluster is available on ports 7000-7006 but in the PR it looks like the cluster is on ports 7000-7005. The example command to start the redis cluster in the PR description also looks like it starts it on 8000-8005 so it should probably be updated to use 7000-7005

@Yury-Fridlyand
Copy link
Author

Sharp eyes! Command line listed in PR is an example. It could be helpful for test R&D.

Yury-Fridlyand added a commit that referenced this pull request Jan 31, 2024
* Add IT framework (#63)

Signed-off-by: Yury-Fridlyand <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants