Skip to content

Commit

Permalink
Fix off-by-one in nextInt() call
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed May 12, 2015
1 parent 56781a1 commit 0ad34da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void testSortingManyNumbers() throws Exception {
int[] numbersToSort = new int[128000];
Random random = new Random(16);
for (int i = 0; i < numbersToSort.length; i++) {
numbersToSort[i] = random.nextInt(PackedRecordPointer.MAXIMUM_PARTITION_ID);
numbersToSort[i] = random.nextInt(PackedRecordPointer.MAXIMUM_PARTITION_ID + 1);
sorter.insertRecord(0, numbersToSort[i]);
}
Arrays.sort(numbersToSort);
Expand Down

0 comments on commit 0ad34da

Please sign in to comment.