diff --git a/src/test/java/org/elasticsearch/common/jna/NativesTests.java b/src/test/java/org/elasticsearch/common/jna/NativesTests.java index 418bcfbd1f5..37725b5b5e8 100644 --- a/src/test/java/org/elasticsearch/common/jna/NativesTests.java +++ b/src/test/java/org/elasticsearch/common/jna/NativesTests.java @@ -31,7 +31,9 @@ public class NativesTests extends ElasticsearchTestCase { public void testMlockall() { if (Constants.MAC_OS_X) { assertFalse("Memory locking is not available on OS X platforms", Natives.LOCAL_MLOCKALL); - } else { + } + + if (Constants.WINDOWS) { assertTrue(Natives.LOCAL_MLOCKALL); } }