We have a test that tries to test the "calibration" function in BCrypt.
This function is supposed to return a "cost" based on some number of
milliseconds passed in. We're trying to make the cost relative to some
beginning cost (MIN_COST + 1), time that, then use it as the "relative
time". The problem is that the time this takes in CI is not constant,
so even `min_time_ms * 4` may fit inside the same "cost" as the
original.
I'm bumping the factor to `5` to hopefully reduce the flakiness. It
seems like we just want to test that "some time deadline" returns a
greater cost than a different time deadline, so I think bumping the
factor to 5 is a legit fix
We have a test that tries to test the "calibration" function in BCrypt. This function is supposed to return a "cost" based on some number of milliseconds passed in. We're trying to make the cost relative to some beginning cost (MIN_COST + 1), time that, then use it as the "relative time". The problem is that the time this takes in CI is not constant, so even min_time_ms * 4 may fit inside the same "cost" as the original.
I'm bumping the factor to 5 to hopefully reduce the flakiness. It seems like we just want to test that "some time deadline" returns a greater cos than a different time deadline, so I think bumping the factor to 5 is a legit fix