Deflake TestEtcdGrpcResolverRoundRobin.

Signed-off-by: James Blair <mail@jamesblair.net>
This commit is contained in:
James Blair 2023-05-10 21:03:01 +12:00
parent 7f6d0d04ac
commit 3f5ad36039
No known key found for this signature in database

View File

@ -123,9 +123,9 @@ func testEtcdGrpcResolver(t *testing.T, lbPolicy string) {
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
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))
}
}