[TEST] fix test to only enforce settings if it's not negative AND less than the limit
This commit is contained in:
parent
35ae8263af
commit
a574baaf3e
|
@ -43,7 +43,7 @@ public class BootstrapSettingsTests extends ESTestCase {
|
||||||
long maxFileDescriptorCount = ProcessProbe.getInstance().getMaxFileDescriptorCount();
|
long maxFileDescriptorCount = ProcessProbe.getInstance().getMaxFileDescriptorCount();
|
||||||
try {
|
try {
|
||||||
Bootstrap.enforceOrLogLimits(build);
|
Bootstrap.enforceOrLogLimits(build);
|
||||||
if (maxFileDescriptorCount != -1 || maxFileDescriptorCount < (1 << 16)) {
|
if (maxFileDescriptorCount != -1 && maxFileDescriptorCount < (1 << 16)) {
|
||||||
fail("must have enforced limits: " + maxFileDescriptorCount);
|
fail("must have enforced limits: " + maxFileDescriptorCount);
|
||||||
}
|
}
|
||||||
} catch (IllegalStateException ex) {
|
} catch (IllegalStateException ex) {
|
||||||
|
|
Loading…
Reference in New Issue