From ca5cac998e75e52b73ad2794042b9165f4833020 Mon Sep 17 00:00:00 2001 From: Binbin Date: Tue, 20 Feb 2024 18:21:10 +0800 Subject: [PATCH] xinfo-stream add minimum to seen-time, skip logreqres in fuzzer (#13056) 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 --- src/commands/xinfo-stream.json | 3 ++- tests/integration/corrupt-dump-fuzzer.tcl | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/xinfo-stream.json b/src/commands/xinfo-stream.json index 018826f91..609dc336d 100644 --- a/src/commands/xinfo-stream.json +++ b/src/commands/xinfo-stream.json @@ -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", diff --git a/tests/integration/corrupt-dump-fuzzer.tcl b/tests/integration/corrupt-dump-fuzzer.tcl index 132f8891c..206e503fc 100644 --- a/tests/integration/corrupt-dump-fuzzer.tcl +++ b/tests/integration/corrupt-dump-fuzzer.tcl @@ -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,