Skip to content

Commit

Permalink
Fix flaky test **/testSearchTaskCancellationWithHighCpu & shard var…
Browse files Browse the repository at this point in the history
…iant (opensearch-project#7978)

* Fix flake

Signed-off-by: Stephen Crawford <[email protected]>

* Drop threshold further

Signed-off-by: Stephen Crawford <[email protected]>

* Remove empty line

Signed-off-by: Stephen Crawford <[email protected]>

* Change threshold for ShardCPU test

Signed-off-by: Stephen Crawford <[email protected]>

---------

Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Rishab Nahata <[email protected]>
  • Loading branch information
stephen-crawford authored and imRishN committed Jun 27, 2023
1 parent 55bce00 commit b2c77f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void testSearchShardTaskCancellationWithHighElapsedTime() throws Interrup
public void testSearchTaskCancellationWithHighCpu() throws InterruptedException {
Settings request = Settings.builder()
.put(SearchBackpressureSettings.SETTING_MODE.getKey(), "enforced")
.put(SearchTaskSettings.SETTING_CPU_TIME_MILLIS_THRESHOLD.getKey(), 1000)
.put(SearchTaskSettings.SETTING_CPU_TIME_MILLIS_THRESHOLD.getKey(), 50)
.build();
assertAcked(client().admin().cluster().prepareUpdateSettings().setPersistentSettings(request).get());

Expand Down Expand Up @@ -182,7 +182,7 @@ public void testSearchTaskCancellationWithHighCpu() throws InterruptedException
public void testSearchShardTaskCancellationWithHighCpu() throws InterruptedException {
Settings request = Settings.builder()
.put(SearchBackpressureSettings.SETTING_MODE.getKey(), "enforced")
.put(SearchShardTaskSettings.SETTING_CPU_TIME_MILLIS_THRESHOLD.getKey(), 1000)
.put(SearchShardTaskSettings.SETTING_CPU_TIME_MILLIS_THRESHOLD.getKey(), 50)
.build();
assertAcked(client().admin().cluster().prepareUpdateSettings().setPersistentSettings(request).get());

Expand Down

0 comments on commit b2c77f3

Please sign in to comment.