Skip to content

Commit

Permalink
bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
ctbrennan committed Sep 13, 2024
1 parent 4ce975d commit 1a740bc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,14 @@ public void testTabletToCnMapping() throws Exception {
for (long cnId : group1Cn) {
int chosenCount = cnChoiceCount[(int) cnId];
float chosenRate = (float) chosenCount / tabletsToTry;
Assert.assertTrue(chosenRate > .3 && chosenRate < .36);
// (1/num_cn_in_group_1) +- a little bit
Assert.assertTrue(chosenRate > .31 && chosenRate < .35);
}
for (long cnId : group2Cn) {
int chosenCount = cnChoiceCount[(int) cnId];
float chosenRate = (float) chosenCount / tabletsToTry;
Assert.assertTrue(chosenRate > .16 && chosenRate < .32);
// 2 * (1/num_cn_in_group_2) +- a little bit
Assert.assertTrue(chosenRate > .18 && chosenRate < .22);
}

// Check on remapping behavior after removing some CN
Expand Down

0 comments on commit 1a740bc

Please sign in to comment.