Jackie-Jiang commented on a change in pull request #7435: URL: https://github.com/apache/pinot/pull/7435#discussion_r710539984
########## File path: pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/creator/RangeIndexCreatorTest.java ########## @@ -35,11 +37,12 @@ import org.testng.annotations.Test; import static org.apache.pinot.segment.spi.V1Constants.Indexes.BITMAP_RANGE_INDEX_FILE_EXTENSION; +import static org.testng.Assert.*; public class RangeIndexCreatorTest { private static final File INDEX_DIR = new File(FileUtils.getTempDirectory(), "RangeIndexCreatorTest"); - private static final Random RANDOM = new Random(); + private static final Random RANDOM = new Random(42); Review comment: I think the non-determinism in the article doesn't refer to fixing the input data, but the test should not be flaky (in the article: `In talking with development teams I've often heard about the problem of non-deterministic tests - tests that sometimes pass and sometimes fail.`). The reason why we use random input values is because we usually cannot come up with (or too time consuming to create) all different inputs to cover all corner cases, so we use random input to do incremental checks during each CI run. The test should pass regardless of the input values, and when we detect test flakiness, we can check and fix the implementation (or the test). I think this test can be flaky in certain cases (e.g. MIN/MAX integer values are generated, same values are generated and split into different ranges), but since the old implementation is going to be deprecated, we can leave it as is and not spend time fixing this test. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org