Skip to content

Commit 050ddda

Browse files
authored
Fix TestStreamWriteYAMLResponse flakyness (#4122)
Signed-off-by: Marco Pracucci <[email protected]>
1 parent a0cd678 commit 050ddda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/util/http_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ func TestStreamWriteYAMLResponse(t *testing.T) {
108108
expectedContentType: "application/yaml",
109109
value: make(map[string]*testStruct),
110110
}
111-
for i := 0; i < rand.Intn(100); i++ {
111+
112+
// Generate some data to serialize.
113+
for i := 0; i < rand.Intn(100)+1; i++ {
112114
ts := testStruct{
113115
Name: "testName" + strconv.Itoa(i),
114116
Value: i,

0 commit comments

Comments
 (0)