After the fix for the infinite loop in
YARN-8833 we now get the wrong values back for fairshare calculations under certain circumstances. The current implementation works when the total resource is smaller than Integer.MAXVALUE.
When the total resource goes above that value the number of iterations is not enough to converge to the correct value.
The new test testResourceUsedWithWeightToResourceRatio() only checks that the calculation does not hang but does not check the outcome of the calculation.