Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4148

_TestUtil should be able to generate random longs

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 4.0-ALPHA, 6.0
    • general/test
    • None
    • New

    Description

      It would be helpful in TestPackedInts at least, in order to generate random values (as a workaround, we currently generate a random int between 0 and min(Integer.MAX_VALUE, PackedInts.maxValue(bitsPerValue)). Moreover, it would help to fix nextInt for large ranges (calling nextInt(random, -10, Integer.MAX_VALUE) or even nextInt(random, 0, Integer.MAX_VALUE) currently fails because the range of values is > Integer.MAX_VALUE.

      Attachments

        1. LUCENE-4148.patch
          10 kB
          Adrien Grand

        Activity

          People

            jpountz Adrien Grand
            jpountz Adrien Grand
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: