Skip to content

Commit

Permalink
Use adminClient instead of client when interacting with system index …
Browse files Browse the repository at this point in the history
…in integTests

Signed-off-by: Craig Perkins <cwperx@amazon.com>
  • Loading branch information
cwperks committed Aug 2, 2024
1 parent f02bb01 commit 9ed28df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class IndexManagementIndicesIT : IndexStateManagementRestTestCase() {
.replace("\"schema_version\": $configSchemaVersion", "\"schema_version\": 0")

val entity = StringEntity(mapping, ContentType.APPLICATION_JSON)
client().makeRequest(
adminClient().makeRequest(
RestRequest.Method.PUT.toString(),
"/$INDEX_MANAGEMENT_INDEX/_mapping", emptyMap(), entity,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ abstract class IndexManagementRestTestCase : ODFERestTestCase() {
// Since from the log, this happens very fast (within 0.1~0.2s), the above cluster explain may not have the granularity to catch this.
logger.info("Update rollup start time to $startTimeMillis")
val response =
client().makeRequest(
adminClient().makeRequest(
"POST", "${IndexManagementPlugin.INDEX_MANAGEMENT_INDEX}/_update/${update.id}?wait_for_active_shards=$waitForActiveShards&refresh=true",
StringEntity(
"{\"doc\":{\"rollup\":{\"schedule\":{\"interval\":{\"start_time\":" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ abstract class IndexStateManagementRestTestCase : IndexManagementRestTestCase()
val waitForActiveShards = if (isMultiNode) "all" else "1"
val endpoint = "$INDEX_MANAGEMENT_INDEX/_update/${update.id}?wait_for_active_shards=$waitForActiveShards;retry_on_conflict=$retryOnConflict"
val response =
client().makeRequest(
adminClient().makeRequest(
"POST", endpoint,
StringEntity(
"{\"doc\":{\"managed_index\":{\"schedule\":{\"interval\":{\"start_time\":" +
Expand Down

0 comments on commit 9ed28df

Please sign in to comment.