mirror of
https://github.com/prometheus/prometheus
synced 2024-12-25 07:52:28 +00:00
Only show debug output on test failure
This commit is contained in:
parent
e6ea146c81
commit
c0ce35d2d3
@ -385,11 +385,6 @@ func (ev *evalCmd) compareResult(result Value) error {
|
||||
return fmt.Errorf("received instant result on range evaluation")
|
||||
}
|
||||
|
||||
fmt.Println("vector result", len(val), ev.expr)
|
||||
for _, ss := range val {
|
||||
fmt.Println(" ", ss.Metric, ss.Point)
|
||||
}
|
||||
|
||||
seen := map[uint64]bool{}
|
||||
for pos, v := range val {
|
||||
fp := v.Metric.Hash()
|
||||
@ -408,6 +403,10 @@ func (ev *evalCmd) compareResult(result Value) error {
|
||||
}
|
||||
for fp, expVals := range ev.expected {
|
||||
if !seen[fp] {
|
||||
fmt.Println("vector result", len(val), ev.expr)
|
||||
for _, ss := range val {
|
||||
fmt.Println(" ", ss.Metric, ss.Point)
|
||||
}
|
||||
return fmt.Errorf("expected metric %s with %v not found", ev.metrics[fp], expVals)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user