mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #15868 from jmhbnz/main
tests: Deflake TestEtcdGrpcResolverRoundRobin
This commit is contained in:
commit
e3db9dc616
@ -123,9 +123,9 @@ func testEtcdGrpcResolver(t *testing.T, lbPolicy string) {
|
|||||||
t.Fatalf("couldn't convert to int: %s", string(lastResponse))
|
t.Fatalf("couldn't convert to int: %s", string(lastResponse))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow 15% tolerance as round robin is not perfect and we don't want the test to flake
|
// Allow 25% tolerance as round robin is not perfect and we don't want the test to flake
|
||||||
expected := float64(totalRequests) * 0.5
|
expected := float64(totalRequests) * 0.5
|
||||||
assert.InEpsilon(t, float64(expected), float64(responses), 0.15, "unexpected total responses from foo: %s", string(lastResponse))
|
assert.InEpsilon(t, float64(expected), float64(responses), 0.25, "unexpected total responses from foo: %s", string(lastResponse))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user