Skip to content

Commit

Permalink
xinfo-stream add minimum to seen-time, skip logreqres in fuzzer (#13056)
Browse files Browse the repository at this point in the history
Recently I saw in CI that reply-schemas-validator fails here:
```
Failed validating 'minimum' in schema[1]['properties']['groups']['items']['properties']['consumers']['items']['properties']['active-time']:
    {'description': 'Last time this consumer was active (successful '
                    'reading/claiming).',
     'minimum': 0,
     'type': 'integer'}

On instance['groups'][0]['consumers'][0]['active-time']:
    -1729380548878722639
```

The reason is that in fuzzer, we may restore corrupted active-time,
which will cause the reply schema CI to fail.

The fuzzer can cause corrupt the state in many places, which will
bugs that mess up the reply, so we decided to skip logreqres.

Also, seen-time is the same type as active-time, adding the minimum.

---------

Co-authored-by: Oran Agra <oran@redislabs.com>
  • Loading branch information
enjoy-binbin and oranagra committed Feb 20, 2024
1 parent 3c2ea1e commit ca5cac9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/commands/xinfo-stream.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@
},
"seen-time": {
"description": "timestamp of the last interaction attempt of the consumer",
"type": "integer"
"type": "integer",
"minimum": 0
},
"pel-count": {
"description": "number of unacknowledged entries that belong to the consumer",
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/corrupt-dump-fuzzer.tcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# tests of corrupt listpack payload with valid CRC

tags {"dump" "corruption" "external:skip"} {
# The fuzzer can cause corrupt the state in many places, which could
# mess up the reply, so we decided to skip logreqres.
tags {"dump" "corruption" "external:skip" "logreqres:skip"} {

# catch sigterm so that in case one of the random command hangs the test,
# usually due to redis not putting a response in the output buffers,
Expand Down

0 comments on commit ca5cac9

Please sign in to comment.