Skip to content

Add lag and entries-read to StreamInfo (XINFO GROUPS) #2949

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests
  • Loading branch information
kkocel committed Dec 9, 2024
commit f645ed9ab24ba02cb42f08832d4cb72cf7c4e406
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,9 @@ public String lastDeliveredId() {
*
* @return
*/
@Nullable
public Long entriesRead() {
return getRequired("entries-read", Long.class);
return get("entries-read", Long.class);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4057,8 +4057,8 @@ public void xinfoGroupsNoConsumer() {
assertThat(info.get(0).groupName()).isEqualTo("my-group");
assertThat(info.get(0).consumerCount()).isZero();
assertThat(info.get(0).pendingCount()).isZero();
assertThat(info.get(0).lag()).isZero();
assertThat(info.get(0).entriesRead()).isZero();
assertThat(info.get(0).lag()).isEqualTo(2);
assertThat(info.get(0).entriesRead()).isNull();
assertThat(info.get(0).lastDeliveredId()).isEqualTo("0-0");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ void xinfoGroupsNoConsumer() {
assertThat(info.groupName()).isEqualTo("my-group");
assertThat(info.consumerCount()).isZero();
assertThat(info.pendingCount()).isZero();
assertThat(info.entriesRead()).isZero();
assertThat(info.lag()).isZero();
assertThat(info.entriesRead()).isNull();
assertThat(info.lag()).isEqualTo(2);
assertThat(info.lastDeliveredId()).isEqualTo("0-0");
}).verifyComplete();
}
Expand Down