uschindler commented on a change in pull request #2052: URL: https://github.com/apache/lucene-solr/pull/2052#discussion_r524965464
########## File path: lucene/misc/src/test/org/apache/lucene/misc/store/DirectIODirectoryTest.java ########## @@ -18,29 +18,37 @@ import com.carrotsearch.randomizedtesting.LifecycleScope; import com.carrotsearch.randomizedtesting.RandomizedTest; -import org.apache.lucene.store.ByteBuffersDirectory; -import org.apache.lucene.store.Directory; -import org.apache.lucene.store.IOContext; -import org.apache.lucene.store.MergeInfo; +import org.apache.lucene.store.*; import org.apache.lucene.util.LuceneTestCase; -import org.junit.Rule; -import org.junit.rules.TestRule; import java.io.IOException; -import java.util.EnumSet; +import java.nio.file.Files; -public class NativeUnixDirectoryTest extends LuceneTestCase { - @Rule - public static TestRule requiresNative = new NativeLibEnableRule( - EnumSet.of(NativeLibEnableRule.OperatingSystem.MAC, - NativeLibEnableRule.OperatingSystem.FREE_BSD, - NativeLibEnableRule.OperatingSystem.LINUX)); +import static org.apache.lucene.misc.store.DirectIODirectory.DEFAULT_MIN_BYTES_DIRECT; - public void testLibraryLoaded() throws IOException { +public class DirectIODirectoryTest extends LuceneTestCase { Review comment: OK, then WindowsDirectory is obsolete, too. Thanks for testing. Nevertheless, as mentioned before, we should add javadocs, that on unsupported platforms, this directory may throw UOE on opening/closing IndexInputs. We should also extend this test to use a random directory (FS based) as delegate. It looks strange to me to just use a ByteBuffersDirectory as delegate, as the filestore is totally different. So: Extend the BaseDirectoryTestcase and then create a random temp dir and then build FSDirectory.open() as backend and use DirectIO as wrapper on top. ---------------------------------------------------------------- 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. 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