kaivalnp commented on code in PR #932: URL: https://github.com/apache/lucene/pull/932#discussion_r931869194
########## lucene/core/src/test/org/apache/lucene/util/hnsw/KnnGraphTester.java: ########## @@ -730,4 +794,61 @@ protected int comparePivot(int j) { return Float.compare(score[pivot], score[j]); } } + + private static class SelectiveQuery extends Query { + + public float selectivity = 1f; + private FixedBitSet selectedBits; + private long cost; + + @SuppressForbidden(reason = "Uses Math.random()") Review Comment: Since the test is run from a static context (main method), I'm unable to use `LuceneTestCase` We can: - Keep using Math.random and suppress warnings - Change the code a bit to test using `run` function instead of `main` (not depend on instantiating `KnnGraphTester`) The second might be better for reproducibility (ability to run using seed) Any suggestions on this? -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org