Skip to content

Commit 34c9eee

Browse files
committed
Extend rendezvous hash testing
1 parent e1567d1 commit 34c9eee

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

binderhub/tests/test_utils.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ def test_rendezvous_redistribution():
5252
# making this comparison
5353
assert 0.31 < n_moved / n_keys < 0.35
5454
# keys should move from the two original buckets with approximately
55-
# equal probability
56-
assert abs(from_bucket["b1"] - from_bucket["b2"]) < 10
57-
58-
# use the standard deviation of the expected number of entries in each
59-
# bucket to get an idea for a reasonable (order of magnitude) difference
60-
assert abs(start_in["b1"] - start_in["b2"]) < (n_keys/2)**0.5
55+
# equal probability. We pick 30 because it is "about right"
56+
assert abs(from_bucket["b1"] - from_bucket["b2"]) < 30
57+
# the initial distribution of keys should be roughly the same
58+
# We pick 30 because it is "about right"
59+
assert abs(start_in["b1"] - start_in["b2"]) < 30

0 commit comments

Comments
 (0)