Skip to content

Commit

Permalink
Fix flaky ResourceAwareTasksTests.testBasicTaskResourceTracking test (#…
Browse files Browse the repository at this point in the history
…8993) (#9014)

(cherry picked from commit b2a7348)

Signed-off-by: Ketan Verma <ketan9495@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent a2f3f4a commit 35c0e6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Remove provision to create Remote Indices without Remote Translog Store ([#8719](https://github.com/opensearch-project/OpenSearch/pull/8719))

### Fixed
- Fix flaky ResourceAwareTasksTests.testBasicTaskResourceTracking test ([#8993](https://github.com/opensearch-project/OpenSearch/pull/8993))

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,8 @@ private void assertTasksRequestFinishedSuccessfully(NodesResponse nodesResponse,
}

private void assertMemoryUsageWithinLimits(long actual, long expected) {
// 5% buffer up to 200 KB to account for classloading overhead.
long maxOverhead = Math.min(200000, expected * 5 / 100);
// 5% buffer up to 500 KB to account for classloading overhead.
long maxOverhead = Math.min(500000, expected * 5 / 100);
assertThat(actual, lessThanOrEqualTo(expected + maxOverhead));
}

Expand Down

0 comments on commit 35c0e6e

Please sign in to comment.