GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve CI pipeline stability by atakavci · Pull Request #4512 · redis/jedis

Conversation

@atakavci

@atakavci atakavci commented May 7, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

A handful of integration tests were intermittently failing in CI because they asserted Redis-server-internal behavior (LRU-clock resolution, SCAN pagination cadence) rather than the Jedis client contract. This PR removes / relaxes those server-behavior assertions while keeping the Jedis-surface checks intact.

Issue

Three flake patterns were observed:

  1. OBJECT IDLETIME after Thread.sleep(...) — asserted > 0. Redis tracks idle time via a cached server.lruclock with 1-second resolution, updated by serverCron (default hz 10). When SET and OBJECT IDLETIME land in the same LRU tick, the value is 0 and the assertion fails. Observed in CommandObjectsServerManagementCommandsTest#testObjectIdletime and inside the various touch() tests.

  2. SCAN ... COUNT 4 TYPE string over 7 keys — asserted that the first page does not complete the iteration (assertFalse(isCompleteIteration())). COUNT is documented as a hint; with a small dict the entire keyspace can fit in one page and Redis returns cursor 0. The neighboring scanIsCompleteIteration test already documents this with a 100-key dataset and a comment pointing to the Redis docs. Observed in RedisClientAllKindOfValuesCommandsTest#scanType.

None of these assertions exercise Jedis-side encoding, cursor round-trip, or response decoding — they only exercise Redis's own scheduling.

Fix

  • objectIdletime assertions in the affected tests are relaxed to >= 0 and the surrounding Thread.sleep(1100) calls are removed. The TOUCH count assertions (the actual Jedis contract) are unchanged.
  • scanType is rewritten to iterate to completion via the cursor returned by Jedis and assert the union of returned keys equals the expected set, instead of asserting a specific per-page cursor state. This still covers the Jedis-relevant behavior: SCAN ... [COUNT n] TYPE <t> encoding, cursor round-trip (both String and byte[]), and response decoding.

Note

Low Risk
Low risk: changes are limited to integration test assertions/structure to avoid Redis-server timing and SCAN pagination variability, with no production code impact.

Overview
Improves CI stability by removing timing- and server-internals-dependent assertions in Redis integration tests.

OBJECT IDLETIME checks no longer rely on Thread.sleep(...) and now assert >= 0 (string and binary variants, including cluster/unified tests). SCAN ... TYPE string tests are rewritten to iterate cursors to completion and assert the union of returned keys matches expectations instead of asserting specific pagination/isCompleteIteration() behavior.

Reviewed by Cursor Bugbot for commit 7a16fa1. Bugbot is set up for automated code reviews on this repo. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@atakavci
- improve test stability
16a3ed1
@atakavci
atakavci requested review from a-TODO-rov, Copilot and ggivo May 7, 2026 12:02
@atakavci atakavci self-assigned this May 7, 2026
@atakavci atakavci added the techdebt Things that can be improved or refactored label May 7, 2026
Copilot started reviewing on behalf of atakavci May 7, 2026 12:03
View session
cursor[bot]
cursor Bot reviewed May 7, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 16a3ed1. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...st/java/redis/clients/jedis/commands/unified/cluster/ClusterAllKindOfValuesCommandsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/java/redis/clients/jedis/commands/jedis/AllKindOfValuesCommandsTest.java
binaryResult = jedis.scan(binaryResult.getCursorAsBytes(), pagingParams, string);
assertTrue(binaryResult.isCompleteIteration());
page2Count = binaryResult.getResult().size();
int page2Count = binaryResult.getResult().size();

@cursor cursor Bot May 7, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Binary SCAN still uses flaky pagination assertion

Medium Severity

The binary section of scanType still asserts assertFalse(binaryResult.isCompleteIteration()) on the first page — the same flaky server-behavior assumption this PR removes from the string section (lines 852–860) and from AllKindOfValuesCommandsTestBase.java. With a small dict and COUNT 4, Redis may return all results in one page, causing intermittent test failure.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 16a3ed1. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI reviewed May 7, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to reduce CI flakiness by relaxing/removing test assertions that depend on Redis server-internal timing/pagination behavior (LRU-clock resolution for OBJECT IDLETIME, and SCAN COUNT pagination cadence) rather than the Jedis client contract.

Changes:

  • Relaxed OBJECT IDLETIME assertions (and removed sleeps) to avoid timing-dependent failures.
  • Reworked SCAN ... TYPE string tests to iterate via returned cursors and assert the union of keys returned.
  • Minor formatting cleanup in one assertion.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/test/java/redis/clients/jedis/commands/unified/cluster/ClusterAllKindOfValuesCommandsTest.java Updates cluster unified tests for touch() and rewrites scanType() string SCAN assertions.
src/test/java/redis/clients/jedis/commands/unified/AllKindOfValuesCommandsTestBase.java Updates unified base tests to relax objectIdletime checks and rewrites scanType() (String + binary) to scan to completion.
src/test/java/redis/clients/jedis/commands/jedis/AllKindOfValuesCommandsTest.java Updates standalone Jedis tests to relax objectIdletime checks and rewrites scanType() String branch (binary branch still page-dependent).
src/test/java/redis/clients/jedis/commands/commandobjects/CommandObjectsServerManagementCommandsTest.java Relaxes objectIdletime assertions in command-object tests to avoid LRU tick timing flakiness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...st/java/redis/clients/jedis/commands/unified/cluster/ClusterAllKindOfValuesCommandsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/java/redis/clients/jedis/commands/unified/AllKindOfValuesCommandsTestBase.java
Comment on lines +677 to +687
Set<byte[]> binaryStringKeys = new HashSet<>();
byte[] binaryCursor = SCAN_POINTER_START_BINARY;
ScanResult<byte[]> binaryResult;
do {
binaryResult = jedis.scan(binaryCursor, pagingParams, string);
binaryStringKeys.addAll(binaryResult.getResult());
binaryCursor = binaryResult.getCursorAsBytes();
} while (!binaryResult.isCompleteIteration());
Set<byte[]> expectedBinaryStringKeys = new HashSet<>(Arrays.asList(
"a".getBytes(), "c".getBytes(), "e".getBytes(), "g".getBytes()));
AssertUtil.assertByteArraySetEquals(expectedBinaryStringKeys, binaryStringKeys);
Comment thread src/test/java/redis/clients/jedis/commands/jedis/AllKindOfValuesCommandsTest.java
Comment on lines 885 to 891
binaryResult = jedis.scan(SCAN_POINTER_START_BINARY, pagingParams, string);
assertFalse(binaryResult.isCompleteIteration());
page1Count = binaryResult.getResult().size();
int page1Count = binaryResult.getResult().size();
binaryResult = jedis.scan(binaryResult.getCursorAsBytes(), pagingParams, string);
assertTrue(binaryResult.isCompleteIteration());
page2Count = binaryResult.getResult().size();
int page2Count = binaryResult.getResult().size();
assertEquals(4, page1Count + page2Count);
@atakavci
fix assertion data
ee3e57f
ggivo
ggivo approved these changes May 8, 2026
View reviewed changes

@ggivo ggivo left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@uglide
Merge branch 'master' into ali/improveTestStability
7a16fa1
@uglide
uglide merged commit b2228fc into redis:master May 8, 2026
15 of 16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ggivo ggivo added the testing label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@ggivo ggivo ggivo approved these changes
@a-TODO-rov a-TODO-rov Awaiting requested review from a-TODO-rov
+1 more reviewer
@cursor cursor[bot] cursor[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@atakavci atakavci

Labels

techdebt Things that can be improved or refactored testing

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@atakavci @ggivo @uglide
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.