diff --git a/core/src/test/java/org/elasticsearch/bootstrap/BootstrapSettingsTests.java b/core/src/test/java/org/elasticsearch/bootstrap/BootstrapSettingsTests.java index 8fd1b5ab2d1..0ed6c8da6c1 100644 --- a/core/src/test/java/org/elasticsearch/bootstrap/BootstrapSettingsTests.java +++ b/core/src/test/java/org/elasticsearch/bootstrap/BootstrapSettingsTests.java @@ -43,7 +43,7 @@ public class BootstrapSettingsTests extends ESTestCase { long maxFileDescriptorCount = ProcessProbe.getInstance().getMaxFileDescriptorCount(); try { Bootstrap.enforceOrLogLimits(build); - if (maxFileDescriptorCount != -1 || maxFileDescriptorCount < (1 << 16)) { + if (maxFileDescriptorCount != -1 && maxFileDescriptorCount < (1 << 16)) { fail("must have enforced limits: " + maxFileDescriptorCount); } } catch (IllegalStateException ex) {