From a574baaf3eaa4628d50e1d39f69e67b2c37b1f86 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 22 Feb 2016 10:50:00 -0800 Subject: [PATCH] [TEST] fix test to only enforce settings if it's not negative AND less than the limit --- .../org/elasticsearch/bootstrap/BootstrapSettingsTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {