Skip to content

Commit

Permalink
Unmute HeapAttack#testHugeManyConcat (elastic#104241)
Browse files Browse the repository at this point in the history
The heap attack recent failures are because of elastic#104240. Analyzing 2000 
fields took more than 5 minutes in CI. With the fix in elastic#104246, we can
enable this test now.

Relates elastic#10424
  • Loading branch information
dnhatn authored Jan 11, 2024
1 parent 5b019c9 commit 52bd9e8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public class HeapAttackIT extends ESRestTestCase {
.setting("xpack.license.self_generated.type", "trial")
.build();

static volatile boolean SUITE_ABORTED = false;

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
Expand Down Expand Up @@ -219,7 +221,6 @@ public void testManyConcat() throws IOException {
/**
* Hits a circuit breaker by building many moderately long strings.
*/
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/pull/104241")
public void testHugeManyConcat() throws IOException {
initManyLongs();
assertCircuitBreaks(() -> manyConcat(2000));
Expand Down Expand Up @@ -319,6 +320,7 @@ public void onFailure(Exception e) {

@Override
protected void doRun() throws Exception {
SUITE_ABORTED = true;
TimeValue elapsed = TimeValue.timeValueNanos(System.nanoTime() - startedTimeInNanos);
logger.info("--> test {} triggering OOM after {}", getTestName(), elapsed);
Request triggerOOM = new Request("POST", "/_trigger_out_of_memory");
Expand Down Expand Up @@ -550,6 +552,7 @@ private static void assertWriteResponse(Response response) throws IOException {
@Before
@After
public void assertRequestBreakerEmpty() throws Exception {
assumeFalse("suite was aborted", SUITE_ABORTED);
assertBusy(() -> {
HttpEntity entity = adminClient().performRequest(new Request("GET", "/_nodes/stats")).getEntity();
Map<?, ?> stats = XContentHelper.convertToMap(XContentType.JSON.xContent(), entity.getContent(), false);
Expand Down

0 comments on commit 52bd9e8

Please sign in to comment.