mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Add comments explaning handling failed requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
d8da98c49f
commit
619ca4f5cf
@ -113,6 +113,7 @@ func (h *appendableHistory) AppendDelete(key string, start, end time.Time, resp
|
||||
type history struct {
|
||||
successful []porcupine.Operation
|
||||
// failed requests are kept separate as we don't know return time of failed operations.
|
||||
// Based on https://github.com/anishathalye/porcupine/issues/10
|
||||
failed []porcupine.Operation
|
||||
}
|
||||
|
||||
@ -137,6 +138,8 @@ func (h history) Operations() []porcupine.Operation {
|
||||
maxTime = op.Return
|
||||
}
|
||||
}
|
||||
// Failed requests don't have a known return time.
|
||||
// We simulate Infinity by using return time of latest successfully request.
|
||||
for _, op := range h.failed {
|
||||
if op.Call > maxTime {
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user