ChrisHegarty commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2015261869
> I agree, here it triggers platform specific madvise(). We may add mocks for testing, but I am not sure if it is worth. Maybe the easiest would be to extend IOContext at a later time to return some madvise-like enum as additional abstraction., so the native code just gets a MAdvice enum constant and maps it straight to integers in a simple Map<MAdvice,Integer>. We might be saying the same thing, but I really just wanna get a the `Optional<NativeAccess>` in a unit test and, where present, so as to exercise it's functionalist directly. For now, and it's perfectly fine here, we can test indirectly once we know the various different ways to exercise the code paths. I pushed a trivial test that at least exercises `POSIX_MADV_RANDOM`. -- 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