Skip to content

Commit 66dc61e

Browse files
committed
let runTrafficTest polling retry on mismatch
Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
1 parent 7b14b5b commit 66dc61e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

test/e2e/tests/load_balancing.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ var BackendUtilizationLoadBalancingTest = suite.ConformanceTest{
100100
return len(trafficMap) >= 2
101101
}), nil
102102
}); err != nil {
103+
consistentHashDump(t, suite.RestConfig)
103104
tlog.Errorf(t, "failed to hit both backends during warmup: %v", err)
104105
}
105106
})
@@ -126,6 +127,7 @@ var BackendUtilizationLoadBalancingTest = suite.ConformanceTest{
126127
return lowPct >= lowUtilMinPct
127128
}), nil
128129
}); err != nil {
130+
consistentHashDump(t, suite.RestConfig)
129131
tlog.Errorf(t, "failed to run backend utilization load balancing test: %v", err)
130132
}
131133
})
@@ -185,6 +187,7 @@ var RoundRobinLoadBalancing = suite.ConformanceTest{
185187
if err := wait.PollUntilContextTimeout(t.Context(), time.Second, 30*time.Second, true, func(_ context.Context) (bool, error) {
186188
return runTrafficTest(t, suite, &req, &expectedResponse, sendRequests, compareFunc), nil
187189
}); err != nil {
190+
consistentHashDump(t, suite.RestConfig)
188191
tlog.Errorf(t, "failed to run round robin load balancing test: %v", err)
189192
}
190193
})
@@ -233,12 +236,7 @@ func runTrafficTest(t *testing.T, suite *suite.ConformanceTestSuite,
233236
ret := compareFunc(trafficMap)
234237
if !ret {
235238
tlog.Logf(t, "traffic map: %v", trafficMap)
236-
// wait for a while to let envoy flush all the logs.
237-
time.Sleep(6 * time.Second)
238-
consistentHashDump(t, suite.RestConfig)
239-
t.FailNow()
240239
}
241-
242240
return ret
243241
}
244242

0 commit comments

Comments
 (0)