From 981b46e3ec1ce82a5e4f55a4ad57cd9fce8a6662 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Wed, 26 Nov 2025 13:15:40 -0500 Subject: [PATCH] Relax the noise margin threshold in TestConcurrencyIsolation This test is flaking hard now. It seems to me now that the CV of both classes of traffic is relevant to the noise margin to allow in the test, so this commit changes the formula to take both into account. Signed-off-by: Mike Spreitzer --- .../apiserver/flowcontrol/concurrency_util_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/integration/apiserver/flowcontrol/concurrency_util_test.go b/test/integration/apiserver/flowcontrol/concurrency_util_test.go index 6b1efd6984e..a7d1554d776 100644 --- a/test/integration/apiserver/flowcontrol/concurrency_util_test.go +++ b/test/integration/apiserver/flowcontrol/concurrency_util_test.go @@ -279,10 +279,9 @@ func TestConcurrencyIsolation(t *testing.T) { // There are uncontrolled overheads that introduce noise into the system. The coefficient of variation (CV), that is, // standard deviation divided by mean, for a class of traffic is a characterization of all the noise that applied to // that class. We found that noxu1 generally had a much bigger CV than noxu2. This makes sense, because noxu1 probes - // more behavior --- the waiting in queues. So we take the minimum of the two as an indicator of the relative amount - // of noise that comes from all the other behavior. Currently, we use 3 times the experienced coefficient of variation - // as the margin of error. - margin := 3 * math.Min(noxu1LatStats.cv, noxu2LatStats.cv) + // more behavior --- the waiting in queues. Both are relevant, so we mix them to get the + // threshold to apply in this test. + margin := noxu1LatStats.cv + 2*noxu2LatStats.cv t.Logf("Error margin is %v", margin) isConcurrencyExpected := func(name string, observed float64, expected float64) bool {