Skip to content

Comments

Make integration tests compatible with RE#4387

Open
uglide wants to merge 23 commits intomasterfrom
im/skip-it-not-compatible-with-re
Open

Make integration tests compatible with RE#4387
uglide wants to merge 23 commits intomasterfrom
im/skip-it-not-compatible-with-re

Conversation

@uglide
Copy link
Contributor

@uglide uglide commented Jan 2, 2026

  • Guard all RE-incompatible integration tests with @ConditionalOnEnv
  • Fixes all time-based issues when running tests against RE

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Test Results

   301 files   -  2     301 suites   - 2   12m 4s ⏱️ -6s
10 908 tests  - 18  10 852 ✅  - 16  56 💤  - 2  0 ❌ ±0 
 5 631 runs   - 16   5 622 ✅  - 16   9 💤 ±0  0 ❌ ±0 

Results for commit 00523d4. ± Comparison against base commit be47c2f.

This pull request removes 26 and adds 8 tests. Note that renamed tests count towards both.
redis.clients.jedis.commands.jedis.ModuleTest[1] ‑ testModules
redis.clients.jedis.commands.jedis.ModuleTest[2] ‑ testModules
redis.clients.jedis.commands.jedis.ModuleTest[3] ‑ testModules
redis.clients.jedis.tls.ACLRedisClusterClientIT ‑ connectByIpAddress
redis.clients.jedis.tls.ACLRedisClusterClientIT ‑ connectByIpAddressFailsWithSSLParameters
redis.clients.jedis.tls.ACLRedisClusterClientIT ‑ connectToNodesFailsWithSSLParametersAndNoHostMapping
redis.clients.jedis.tls.ACLRedisClusterClientIT ‑ connectToNodesSucceedsWithSSLParametersAndHostMapping
redis.clients.jedis.tls.ACLRedisClusterClientIT ‑ connectWithCustomHostNameVerifier
redis.clients.jedis.tls.ACLRedisClusterClientIT ‑ connectWithCustomSocketFactory
redis.clients.jedis.tls.ACLRedisClusterClientIT ‑ connectWithEmptyTrustStore
…
redis.clients.jedis.tls.RedisClusterClientIT ‑ connectToNodesSucceedsWithSSLParametersAndHostMapping(String, SslOptions)[1]
redis.clients.jedis.tls.RedisClusterClientIT ‑ connectToNodesSucceedsWithSSLParametersAndHostMapping(String, SslOptions)[2]
redis.clients.jedis.tls.RedisClusterClientIT ‑ connectToNodesSucceedsWithSSLParametersAndHostMapping(String, SslOptions)[3]
redis.clients.jedis.tls.RedisClusterClientIT ‑ connectWithCustomHostNameVerifierAndSslOptions
redis.clients.jedis.tls.RedisClusterClientIT ‑ connectWithSslFlag
redis.clients.jedis.tls.RedisClusterClientIT ‑ testSSLDiscoverNodesAutomatically(String, SslOptions)[1]
redis.clients.jedis.tls.RedisClusterClientIT ‑ testSSLDiscoverNodesAutomatically(String, SslOptions)[2]
redis.clients.jedis.tls.RedisClusterClientIT ‑ testSSLDiscoverNodesAutomatically(String, SslOptions)[3]
This pull request skips 1 test.
redis.clients.jedis.UnavailableConnectionTest ‑ testAvoidQuitInDestroyObjectForBrokenConnection

♻️ This comment has been updated with latest results.

@uglide uglide force-pushed the im/skip-it-not-compatible-with-re branch 2 times, most recently from ee72417 to c266e87 Compare January 5, 2026 16:19
@uglide uglide force-pushed the im/skip-it-not-compatible-with-re branch 2 times, most recently from 2b77f6b to 74d5ebf Compare January 23, 2026 14:24
@uglide
Copy link
Contributor Author

uglide commented Jan 27, 2026

augment review

@augmentcode
Copy link

augmentcode bot commented Jan 27, 2026

🤖 Augment PR Summary

Summary: This PR updates Jedis integration tests to run cleanly against Redis Enterprise (RE) environments.

Changes:

  • Introduces widespread use of @ConditionalOnEnv to skip tests/variants that are incompatible with RE.
  • Adds/propagates the EnvCondition JUnit 5 extension in several base test classes so env-gated tests are evaluated consistently.
  • Skips or adjusts RE-incompatible command tests (e.g., blocking list ops, BITOP, SORT STORE, COPY/RENAME-related cases) across commandobjects/jedis/unified/pipeline suites.
  • Relaxes a few timing-sensitive assertions (e.g., HPTTL tolerance, OBJECT IDLETIME) to reduce flakiness.
  • Updates control/config tests to use slowlog-max-len instead of maxmemory for broader compatibility.
  • Improves stability in a few tests via small lifecycle/ordering tweaks (e.g., slowlog entry selection, cluster teardown guarding).

Technical Notes: The new environment gating relies on TestEnvUtil.TEST_ENV_PROVIDER and the EnvCondition execution condition to enable/disable tests at runtime.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

public class SentinelCommandsTest {

@RegisterExtension
public EnvCondition envCondition = new EnvCondition();
Copy link

Choose a reason for hiding this comment

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

Because @ConditionalOnEnv is used at class level and prepare() does endpoint lookups, consider registering EnvCondition as a static @RegisterExtension (or via @ExtendWith) so the condition can disable the container before @BeforeAll runs in Redis Enterprise.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

assertEquals(0, client.clientList(ClientType.MASTER).length());
assertEquals(1, client.clientList(ClientType.SLAVE).split("\\n").length);
assertEquals(1, client.clientList(ClientType.REPLICA).split("\\n").length);
if (!TestEnvUtil.getTestEnvProvider().equals(TestEnvUtil.ENV_REDIS_ENTERPRISE)) {
Copy link

Choose a reason for hiding this comment

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

EnvCondition matches environments via equalsIgnoreCase, but this inline check uses equals, so TEST_ENV_PROVIDER=RE/Re would not be treated as Redis Enterprise here. Consider using a case-insensitive comparison for consistency with the rest of the environment gating.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@AfterAll
public static void resetRedisAfter() {
removeSlots();
if (endpoint != null) {
Copy link

Choose a reason for hiding this comment

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

With the @BeforeAll slot reset removed, a previously “dirty” cluster-unbound could keep slot assignments between runs and impact early assertions. Consider doing a one-time removeSlots() after endpoint is initialized in prepareEndpoints(), in addition to the @AfterAll cleanup.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@uglide uglide force-pushed the im/skip-it-not-compatible-with-re branch 2 times, most recently from 5334382 to 659c4d4 Compare February 16, 2026 13:30
@uglide uglide force-pushed the im/skip-it-not-compatible-with-re branch from 1e67bce to 4ae3bd0 Compare February 20, 2026 16:55
uglide and others added 4 commits February 23, 2026 14:33
- Rely on correctly configured Redis Cluster instead of testing outdated workarounds with hostname mapping
- Merge ACL, SSLOptions and RedisClusterClientIT into one test
- Remove redundant utilities
@jit-ci
Copy link

jit-ci bot commented Feb 24, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@uglide uglide marked this pull request as ready for review February 24, 2026 15:32
@uglide uglide requested a review from ggivo February 24, 2026 15:32
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.

1 participant