mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
fix MachineDependentHeapTests (#129699)
This commit is contained in:
parent
04231e9798
commit
7f12f8009b
2 changed files with 17 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
|||
package org.elasticsearch.server.cli;
|
||||
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.FeatureFlag;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
import org.hamcrest.Matcher;
|
||||
|
||||
|
@ -55,7 +56,8 @@ public class MachineDependentHeapTests extends ESTestCase {
|
|||
assertHeapOptions(64, containsInAnyOrder("-Xmx31744m", "-Xms31744m"), "master");
|
||||
}
|
||||
|
||||
public void testMlOnlyOptions() throws Exception {
|
||||
public void testMlOnlyOptions_new() throws Exception {
|
||||
assumeTrue("feature flag must be enabled for new memory computation", new FeatureFlag("new_ml_memory_computation").isEnabled());
|
||||
assertHeapOptions(1, containsInAnyOrder("-Xmx272m", "-Xms272m"), "ml");
|
||||
assertHeapOptions(4, containsInAnyOrder("-Xmx1092m", "-Xms1092m"), "ml");
|
||||
assertHeapOptions(32, containsInAnyOrder("-Xmx5460m", "-Xms5460m"), "ml");
|
||||
|
@ -65,6 +67,20 @@ public class MachineDependentHeapTests extends ESTestCase {
|
|||
assertHeapOptions(263, containsInAnyOrder("-Xmx21228m", "-Xms21228m"), "ml");
|
||||
}
|
||||
|
||||
public void testMlOnlyOptions_old() throws Exception {
|
||||
assumeTrue(
|
||||
"feature flag must be disabled for old memory computation",
|
||||
new FeatureFlag("new_ml_memory_computation").isEnabled() == false
|
||||
);
|
||||
assertHeapOptions(1, containsInAnyOrder("-Xmx408m", "-Xms408m"), "ml");
|
||||
assertHeapOptions(4, containsInAnyOrder("-Xmx1636m", "-Xms1636m"), "ml");
|
||||
assertHeapOptions(32, containsInAnyOrder("-Xmx8192m", "-Xms8192m"), "ml");
|
||||
assertHeapOptions(64, containsInAnyOrder("-Xmx11468m", "-Xms11468m"), "ml");
|
||||
// We'd never see a node this big in Cloud, but this assertion proves that the 31GB absolute maximum
|
||||
// eventually kicks in (because 0.4 * 16 + 0.1 * (263 - 16) > 31)
|
||||
assertHeapOptions(263, containsInAnyOrder("-Xmx31744m", "-Xms31744m"), "ml");
|
||||
}
|
||||
|
||||
public void testDataNodeOptions() throws Exception {
|
||||
assertHeapOptions(1, containsInAnyOrder("-Xmx512m", "-Xms512m"), "data");
|
||||
assertHeapOptions(8, containsInAnyOrder("-Xmx4096m", "-Xms4096m"), "data");
|
||||
|
|
|
@ -568,9 +568,6 @@ tests:
|
|||
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
|
||||
method: test
|
||||
issue: https://github.com/elastic/elasticsearch/issues/129453
|
||||
- class: org.elasticsearch.server.cli.MachineDependentHeapTests
|
||||
method: testMlOnlyOptions
|
||||
issue: https://github.com/elastic/elasticsearch/issues/129236
|
||||
- class: org.elasticsearch.test.apmintegration.TracesApmIT
|
||||
method: testApmIntegration
|
||||
issue: https://github.com/elastic/elasticsearch/issues/129651
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue