Skip to content

Commit

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

Signed-off-by: Ketan Verma <ketan9495@gmail.com>
(cherry picked from commit b2a7348)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Aug 1, 2023
1 parent 6e47095 commit a34b7db
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 @@ -47,6 +47,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 a34b7db

Please sign in to comment.