Add tolerance value to debug output
When the disruption test fails the output doesn't inform
the reader how much disruption (percentage) it was willing
to tolerate before failing. this adds that.
@@ -318,7 +318,10 @@ func ExpectNoDisruption(f *framework.Framework, tolerate float64, total time.Dur
if percent := float64(duration) / float64(total); percent > tolerate {
framework.Failf("%s for at least %s of %s (%0.0f%%):\n\n%s", reason, duration.Truncate(time.Second), total.Truncate(time.Second), percent*100, strings.Join(describe, "\n"))
} else if duration > 0 {
- FrameworkFlakef(f, "%s for at least %s of %s (%0.0f%%), this is currently sufficient to pass the test/job but not considered completely correct:\n\n%s", reason, duration.Truncate(time.Second), total.Truncate(time.Second), percent*100, strings.Join(describe, "\n"))
+ FrameworkFlakef(f, "%s for at least %s of %s (%0.0f%%), this is currently sufficient to pass the"+
+ " test/job but not considered completely correct.\nTolerating up to %0.0f%% disruption:\n\n%s",
+ reason, duration.Truncate(time.Second), total.Truncate(time.Second), percent*100, tolerate*100,
+ strings.Join(describe, "\n"))
}
}
