mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Remove trappy timeouts from GetSettingsRequest
(#122855)
Relates #107984
This commit is contained in:
parent
c65596b62e
commit
1c368c7d42
65 changed files with 231 additions and 138 deletions
|
@ -110,7 +110,9 @@ public class DataStreamLifecycleDownsampleDisruptionIT extends ESIntegTestCase {
|
|||
GetSettingsResponse getSettingsResponse = cluster.client()
|
||||
.admin()
|
||||
.indices()
|
||||
.getSettings(new GetSettingsRequest().indices(targetIndex).indicesOptions(IndicesOptions.LENIENT_EXPAND_OPEN))
|
||||
.getSettings(
|
||||
new GetSettingsRequest(TEST_REQUEST_TIMEOUT).indices(targetIndex).indicesOptions(IndicesOptions.LENIENT_EXPAND_OPEN)
|
||||
)
|
||||
.actionGet();
|
||||
Settings indexSettings = getSettingsResponse.getIndexToSettings().get(targetIndex);
|
||||
assertThat(indexSettings, is(notNullValue()));
|
||||
|
|
|
@ -194,7 +194,10 @@ public class ILMDownsampleDisruptionIT extends ESIntegTestCase {
|
|||
}, 1, TimeUnit.MINUTES);
|
||||
assertBusy(() -> {
|
||||
assertTrue("target index [" + targetIndex + "] does not exist", indexExists(targetIndex));
|
||||
var getSettingsResponse = client().admin().indices().getSettings(new GetSettingsRequest().indices(targetIndex)).actionGet();
|
||||
var getSettingsResponse = client().admin()
|
||||
.indices()
|
||||
.getSettings(new GetSettingsRequest(TEST_REQUEST_TIMEOUT).indices(targetIndex))
|
||||
.actionGet();
|
||||
assertThat(getSettingsResponse.getSetting(targetIndex, IndexMetadata.INDEX_DOWNSAMPLE_STATUS.getKey()), equalTo("success"));
|
||||
}, 60, TimeUnit.SECONDS);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class DownsampleDataStreamTests extends ESSingleNodeTestCase {
|
|||
// NOTE: here we calculate a delay to index documents because the next data stream write index is created with a start time of
|
||||
// (about) two hours in the future. As a result, we need to have documents whose @timestamp is in the future to avoid documents
|
||||
// being indexed in the old data stream backing index.
|
||||
final String newIndexStartTime = indicesAdmin().prepareGetSettings(rolloverResponse.getNewIndex())
|
||||
final String newIndexStartTime = indicesAdmin().prepareGetSettings(TEST_REQUEST_TIMEOUT, rolloverResponse.getNewIndex())
|
||||
.get()
|
||||
.getSetting(rolloverResponse.getNewIndex(), IndexSettings.TIME_SERIES_START_TIME.getKey());
|
||||
indexDocs(dataStreamName, 10, Instant.parse(newIndexStartTime).toEpochMilli());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue