-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Introduces test matrix based on Redis versions [8.0-M1, 7.4.1, 7.2.6, 6.2.16] #4015
Open
ggivo
wants to merge
46
commits into
redis:master
Choose a base branch
from
ggivo:migrate_to_clients_test_image
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ggivo
force-pushed
the
migrate_to_clients_test_image
branch
2 times, most recently
from
November 10, 2024 19:30
68c372a
to
0aa9343
Compare
This was referenced Nov 11, 2024
ggivo
force-pushed
the
migrate_to_clients_test_image
branch
from
November 11, 2024 08:36
77f7e4e
to
a691416
Compare
tishun
reviewed
Nov 13, 2024
src/test/java/redis/clients/jedis/SSLJedisSentinelPoolTest.java
Outdated
Show resolved
Hide resolved
LGTM, the code looks much neater this way! |
ggivo
force-pushed
the
migrate_to_clients_test_image
branch
from
November 19, 2024 15:53
f965234
to
5cfdb42
Compare
… 6.2.16] Use docker composer to bring up the test env using `redislabs/client-libs-test` image. When run against older Redis version some tests are using commands available only in newer Redis server versions. To resolve this we are introducing two new annotations/rules - Introduce `SinceRedisVersion` annotation/Rule - for conditionally running tests based on Redis server version contacted - Introduce `EnableOnCommad` annotation/Rule - for conditionally running tests based on command availability on the server And mark respective tests with the least Redis Version required by the test - SinceRedisVersion ("7.4.0") - Mark tests using commands/modifiers introduced with Redis 7.4.0 - SinceRedisVersion ("7.2.0") - Mark tests using commands/modifiers introduced with Redis 7.2.0 - SinceRedisVersion ("7.0.0") - Mark tests using commands/modifiers introduced with Redis 7.0.0 The same approach used to mark CSC tests - Disabled client-side caching tests for versions below 7.4 Fix in Jedis Client against Redis server 6.x - Fix NPW on CommandInfo - some of the array elements returned are available based from given RedisServer aclCategories (as of Redis 6.0) , tips , (as of Redis 7.0) subcommands - Fix NPE AccessControlLogEntry when used against Redis 6 Starting with Redis version 7.2.0: Added entry ID, timestamp created, and timestamp last updated fields. Fix Test failures against 6.x - Fix JedisPooledClientSideCacheTest - Fix AccessControlListCommandsTest.aclLogTest:372 » NullPointer - Fix AccessControlListCommandsTest.aclLogWithEntryID:473 » NullPointer - Fix StreamsCommandsTest - Fix StreamsPipelineCommandsTest xadd - Starting with Redis version 7.0.0: Added support for the <ms>-* explicit ID form. - Test env migrated to use native Redis server TLS instead of using stunnel Not all tests were migrated - Disable Modules test in containerized test env ModuleTest uses custom test module to test load/unload/sendCommand. Requires pre-build test module on the same os like test container to avoid errors - Disable UDS tests in containerized test env No easy way to make unix sockets work on MAC with docker
java.lang.AssertionError: Expected :[(2.1909382939338684,41.433790281840835), (2.187376320362091,41.40634178640635)] Actual :[(2.1909382939338684,41.43379028184083), (2.187376320362091,41.40634178640635)] Compare with tolerance to avoid error on returned precision on mac
Adding ignored unit test for repro
This reverts commit f932e59.
Remove stunnel. Redis server version 6 and above have native support for TLS.
sazzad16
requested changes
Nov 24, 2024
src/test/resources/Arch/sentinel5/config/node-sentinel5/redis.conf
Outdated
Show resolved
Hide resolved
src/test/java/redis/clients/jedis/csc/JedisPooledClientSideCacheTest.java
Outdated
Show resolved
Hide resolved
src/test/java/redis/clients/jedis/csc/ClientSideCacheTestBase.java
Outdated
Show resolved
Hide resolved
src/test/java/redis/clients/jedis/csc/ClientSideCacheTestBase.java
Outdated
Show resolved
Hide resolved
- Remove unused configuration - [Code clean up] Use endpoint configuration for creating redis version rule
ggivo
force-pushed
the
migrate_to_clients_test_image
branch
from
November 25, 2024 12:42
b5e04e4
to
6c58815
Compare
sazzad16
reviewed
Nov 26, 2024
src/test/java/redis/clients/jedis/commands/jedis/ControlCommandsTest.java
Outdated
Show resolved
Hide resolved
Issue redis#4020 is resolved now
Issue redis#4020 is resolved now
sazzad16
reviewed
Nov 26, 2024
src/test/java/redis/clients/jedis/commands/jedis/ControlCommandsTest.java
Outdated
Show resolved
Hide resolved
Addressing review comments
sazzad16
requested changes
Nov 27, 2024
...test/java/redis/clients/jedis/commands/jedis/ClusterShardedPublishSubscribeCommandsTest.java
Outdated
Show resolved
Hide resolved
...test/java/redis/clients/jedis/commands/jedis/ClusterShardedPublishSubscribeCommandsTest.java
Outdated
Show resolved
Hide resolved
src/test/java/redis/clients/jedis/commands/jedis/ClusterJedisCommandsTestBase.java
Outdated
Show resolved
Hide resolved
src/test/java/redis/clients/jedis/commands/jedis/AllKindOfValuesCommandsTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: M Sazzadul Hoque <[email protected]>
…esCommandsTest.java Co-authored-by: M Sazzadul Hoque <[email protected]>
sazzad16
reviewed
Dec 1, 2024
src/test/java/redis/clients/jedis/commands/jedis/ClusterJedisCommandsTestBase.java
Outdated
Show resolved
Hide resolved
sazzad16
reviewed
Dec 1, 2024
src/test/java/redis/clients/jedis/commands/unified/cluster/ClusterBitCommandsTest.java
Outdated
Show resolved
Hide resolved
sazzad16
reviewed
Dec 1, 2024
src/test/java/redis/clients/jedis/commands/unified/cluster/ClusterCommandsTestHelper.java
Outdated
Show resolved
Hide resolved
sazzad16
reviewed
Dec 1, 2024
src/test/java/redis/clients/jedis/csc/JedisClusterClientSideCacheTest.java
Outdated
Show resolved
Hide resolved
sazzad16
reviewed
Dec 1, 2024
sazzad16
reviewed
Dec 1, 2024
sazzad16
reviewed
Dec 1, 2024
src/test/java/redis/clients/jedis/commands/commandobjects/CommandObjectsTestBase.java
Outdated
Show resolved
Hide resolved
…andObjectsTestBase.java Co-authored-by: M Sazzadul Hoque <[email protected]>
sazzad16
reviewed
Dec 2, 2024
Co-authored-by: M Sazzadul Hoque <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We use docker composer to bring up the test env using
redislabs/client-libs-test
image.Example command to bring up test env for dev/test
- NOTE : 6.2.16 uses a dedicated .env.v6.12.16 file, since some of the redis configuration settings are not supported in 6.2.16
docker compose --env-file src/test/resources/env/.env.v6.12.16 -f src/test/resources/env/docker-compose.yml up
Introduces test matrix based on Redis versions [8.0-M1, 7.4.1, 7.2.6, 6.2.16]
When run against older Redis version it appears that some tests are using commands available only in newer Redis server versions. To resolve this we are introducing two new annotations/rules
SinceRedisVersion
annotation/Rule - for conditionally running tests based on Redis server version contactedEnableOnCommad
annotation/Rule - for conditionally running tests based on command availability on the serverAnd mark respective tests with the least Redis Version required by the test
The same approach used to mark CSC tests
Fix in Jedis Client (Redis 6.x)
Fix NPE on CommandInfo - some of the array elements returned are available since ( Redis server 6.0/7.0)
(see NPE thrown when invoking Jedis#commandInfo against Redis server 6.2.16 #4017 )
Fix NPE when reading AccessControlLogEntry
(see NPE thrown on jedis.aclLog() used against Redis server 7.2.0< #4016)
Fixed Test failures against 6.x
- Test env migrated to use native Redis server TLS instead of using stunnel
The primary reason for those failures is the Redis server 6.2.16 is returning the non-TLS port in the CLUSTER SLOTS command in contrast to Redis Server 7.2.0+. I suggest reviewing & addressing Cluster SSL related test failures with follow-up PR.
Ignored tests during migration
Disabled ModuleTest in containerized test env.
ModuleTest uses a custom test module to test load/unload/sendCommand. Requires pre-build test module on the same os like test container to avoid errors
Disable UDS tests in containerized test env
No easy way to make unix sockets work on MAC with docker
Closes #4016, Closes #4017