From b684f73e5ca6d3b56409389218d83891dd2d9ae3 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 1 Dec 2016 09:24:44 -0500 Subject: [PATCH] Fix a broken custom fuzzer Trying to create IntStrs from int64s rather than int32s resulted in lots of glog.Error messages that showed up when running tests with "-v". --- pkg/api/testing/fuzzer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/api/testing/fuzzer.go b/pkg/api/testing/fuzzer.go index 7c0bf41055b..e2c0faebdac 100644 --- a/pkg/api/testing/fuzzer.go +++ b/pkg/api/testing/fuzzer.go @@ -153,10 +153,10 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz } else { rollingUpdate := extensions.RollingUpdateDeployment{} if c.RandBool() { - rollingUpdate.MaxUnavailable = intstr.FromInt(int(c.RandUint64())) - rollingUpdate.MaxSurge = intstr.FromInt(int(c.RandUint64())) + rollingUpdate.MaxUnavailable = intstr.FromInt(int(c.Rand.Int31())) + rollingUpdate.MaxSurge = intstr.FromInt(int(c.Rand.Int31())) } else { - rollingUpdate.MaxSurge = intstr.FromString(fmt.Sprintf("%d%%", c.RandUint64())) + rollingUpdate.MaxSurge = intstr.FromString(fmt.Sprintf("%d%%", c.Rand.Int31())) } j.RollingUpdate = &rollingUpdate }