mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Validate watch even if event history cannot be created
Creation of event history requires each client to return consistent events. If clients observed inconsistent view of some revision, merging will fail and return diff between two clients. This however doesn't provide hint on what kind of issue happend. This PR helps cases where there is an error with single watch stream (like event duplication) by running normal watch validation even without full event history. Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
ed994248e0
commit
c37991cf8b
@ -38,7 +38,8 @@ func ValidateAndReturnVisualize(t *testing.T, lg *zap.Logger, cfg Config, report
|
||||
// TODO: Don't use watch events to get event history.
|
||||
eventHistory, err := mergeWatchEventHistory(reports)
|
||||
if err != nil {
|
||||
t.Errorf("Failed merging watch history to create event history, skipping further validation, err: %s", err)
|
||||
t.Errorf("Failed merging watch history to create event history, err: %s", err)
|
||||
validateWatch(t, lg, cfg, reports, nil)
|
||||
return visualize
|
||||
}
|
||||
validateWatch(t, lg, cfg, reports, eventHistory)
|
||||
|
@ -31,8 +31,10 @@ func validateWatch(t *testing.T, lg *zap.Logger, cfg Config, reports []report.Cl
|
||||
validateUnique(t, cfg.ExpectRevisionUnique, r)
|
||||
validateAtomic(t, r)
|
||||
validateBookmarkable(t, r)
|
||||
validateReliable(t, eventHistory, r)
|
||||
validateResumable(t, eventHistory, r)
|
||||
if eventHistory != nil {
|
||||
validateReliable(t, eventHistory, r)
|
||||
validateResumable(t, eventHistory, r)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user