Skip to content

Commit

Permalink
Fix long/int precision for test baseport calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Jun 23, 2020
1 parent 6285b87 commit 88f1dab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ protected static int getBasePort() {
// increases this value, so the mod can eventually become zero, thus we shift on both sides by 1
final long workerId = Long.valueOf(workerIdStr);
assert workerId >= 1 : "Non positive gradle worker id: " + workerIdStr;
startAt = Math.floorMod(workerId - 1, 223) + 1;
startAt = (int) Math.floorMod(workerId - 1, 223L) + 1;
}
assert startAt >= 0 : "Unexpected test worker Id, resulting port range would be negative";
return 10300 + (startAt * 100);
Expand Down

0 comments on commit 88f1dab

Please sign in to comment.