Relax shotgun test. (#6900)

It's non-deterministic algorithm, the test is flaky.
This commit is contained in:
Jiaming Yuan 2021-04-23 13:01:44 +08:00 committed by GitHub
parent a2ecbdaa31
commit 54afa3ac7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ class TestLinear:
# result.
if len(result) > 2:
sampled_result = [score for i, score in enumerate(result)
if i % 2 == 0]
if i % 4 == 0]
sampled_result[-1] = result[-1] # make sure the last one is used
else:
sampled_result = result