Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 24 additions & 0 deletions src/commands/xpending.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,30 @@
}
}
]
},
{
"description": "Summary form when there are no pending messages.",
"type": "array",
"minItems": 4,
"maxItems": 4,
"items": [
{
"description": "Total number of pending messages",
"const": 0
},
{
"description": "Minimal pending entry ID",
"type": "null"
},
{
"description": "Maximal pending entry ID",
"type": "null"
},
{
"description": "Consumers with pending messages",
"type": "null"
}
]
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/type/stream-cgroups.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ start_server {
assert {[llength $pending] == 4}
}

test {XPENDING only group with an empty PEL} {
r XGROUP CREATE mystream emptygroup $
assert_equal {0 {} {} {}} [r XPENDING mystream emptygroup]
r XGROUP DESTROY mystream emptygroup
}

test {XPENDING with IDLE} {
after 20
set pending [r XPENDING mystream mygroup IDLE 99999999 - + 10 consumer-1]
Expand Down
6 changes: 5 additions & 1 deletion utils/req-res-log-validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ def process_file(docs, path):
print("Response: (unprintable)")
print(f"Schema: {json.dumps(req.schema, indent=2)}")
print(traceback.format_exc())
raise
# jsonschema exceptions hold a reference to a TypeChecker lambda in
# jsonschema._types, which cannot be pickled. process_file runs in a
# multiprocessing pool worker, so re-raising one makes the parent report
# MaybeEncodingError/PicklingError instead of the validation failure.
raise RuntimeError(f"JSON schema validation error on {path}: {err}")

return command_counter

Expand Down
Loading