Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp refactor cluster metrics monitor suspendUntil() to get(). #1015

Merged
merged 6 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
if (pathParams.isNotBlank()) {
indicesList = pathParams.split(",").toTypedArray()

require(validate() == null) { "The path parameters do not form a valid, comma-separated list of data streams, indices, or index aliases." }
require(validate() == null) {
"The path parameters do not form a valid, comma-separated list of data streams, indices, or index aliases."
}

clusterHealthRequest = clusterHealthRequest.indices(*indicesList)
clusterStateRequest = clusterStateRequest.indices(*indicesList)
Expand Down Expand Up @@ -95,7 +97,7 @@
}

override fun writeTo(out: StreamOutput) {
out.writeList(indexInfoList)

Check warning on line 100 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatIndicesHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatIndicesHelpers.kt#L100

Added line #L100 was not covered by tests
}

override fun toXContent(builder: XContentBuilder, params: ToXContent.Params): XContentBuilder {
Expand Down Expand Up @@ -139,8 +141,8 @@
val primaryStats: CommonStats?
val totalStats: CommonStats?
if (indexStats == null || indexState == IndexMetadata.State.CLOSE) {
primaryStats = CommonStats()
totalStats = CommonStats()

Check warning on line 145 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatIndicesHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatIndicesHelpers.kt#L144-L145

Added lines #L144 - L145 were not covered by tests
} else {
primaryStats = indexStats.primaries
totalStats = indexStats.total
Expand Down Expand Up @@ -715,143 +717,143 @@
}

override fun writeTo(out: StreamOutput) {
out.writeString(health)
out.writeString(status)
out.writeString(index)
out.writeString(uuid)
out.writeString(pri)
out.writeString(rep)
out.writeString(docsCount)
out.writeString(docsDeleted)
out.writeString(creationDate)
out.writeString(creationDateString)
out.writeString(storeSize)
out.writeString(priStoreSize)
out.writeString(completionSize)
out.writeString(priCompletionSize)
out.writeString(fieldDataMemorySize)
out.writeString(priFieldDataMemorySize)
out.writeString(fieldDataEvictions)
out.writeString(priFieldDataEvictions)
out.writeString(queryCacheMemorySize)
out.writeString(priQueryCacheMemorySize)
out.writeString(queryCacheEvictions)
out.writeString(priQueryCacheEvictions)
out.writeString(requestCacheMemorySize)
out.writeString(priRequestCacheMemorySize)
out.writeString(requestCacheEvictions)
out.writeString(priRequestCacheEvictions)
out.writeString(requestCacheHitCount)
out.writeString(priRequestCacheHitCount)
out.writeString(requestCacheMissCount)
out.writeString(priRequestCacheMissCount)
out.writeString(flushTotal)
out.writeString(priFlushTotal)
out.writeString(flushTotalTime)
out.writeString(priFlushTotalTime)
out.writeString(getCurrent)
out.writeString(priGetCurrent)
out.writeString(getTime)
out.writeString(priGetTime)
out.writeString(getTotal)
out.writeString(priGetTotal)
out.writeString(getExistsTime)
out.writeString(priGetExistsTime)
out.writeString(getExistsTotal)
out.writeString(priGetExistsTotal)
out.writeString(getMissingTime)
out.writeString(priGetMissingTime)
out.writeString(getMissingTotal)
out.writeString(priGetMissingTotal)
out.writeString(indexingDeleteCurrent)
out.writeString(priIndexingDeleteCurrent)
out.writeString(indexingDeleteTime)
out.writeString(priIndexingDeleteTime)
out.writeString(indexingDeleteTotal)
out.writeString(priIndexingDeleteTotal)
out.writeString(indexingIndexCurrent)
out.writeString(priIndexingIndexCurrent)
out.writeString(indexingIndexTime)
out.writeString(priIndexingIndexTime)
out.writeString(indexingIndexTotal)
out.writeString(priIndexingIndexTotal)
out.writeString(indexingIndexFailed)
out.writeString(priIndexingIndexFailed)
out.writeString(mergesCurrent)
out.writeString(priMergesCurrent)
out.writeString(mergesCurrentDocs)
out.writeString(priMergesCurrentDocs)
out.writeString(mergesCurrentSize)
out.writeString(priMergesCurrentSize)
out.writeString(mergesTotal)
out.writeString(priMergesTotal)
out.writeString(mergesTotalDocs)
out.writeString(priMergesTotalDocs)
out.writeString(mergesTotalSize)
out.writeString(priMergesTotalSize)
out.writeString(mergesTotalTime)
out.writeString(priMergesTotalTime)
out.writeString(refreshTotal)
out.writeString(priRefreshTotal)
out.writeString(refreshTime)
out.writeString(priRefreshTime)
out.writeString(refreshExternalTotal)
out.writeString(priRefreshExternalTotal)
out.writeString(refreshExternalTime)
out.writeString(priRefreshExternalTime)
out.writeString(refreshListeners)
out.writeString(priRefreshListeners)
out.writeString(searchFetchCurrent)
out.writeString(priSearchFetchCurrent)
out.writeString(searchFetchTime)
out.writeString(priSearchFetchTime)
out.writeString(searchFetchTotal)
out.writeString(priSearchFetchTotal)
out.writeString(searchOpenContexts)
out.writeString(priSearchOpenContexts)
out.writeString(searchQueryCurrent)
out.writeString(priSearchQueryCurrent)
out.writeString(searchQueryTime)
out.writeString(priSearchQueryTime)
out.writeString(searchQueryTotal)
out.writeString(priSearchQueryTotal)
out.writeString(searchScrollCurrent)
out.writeString(priSearchScrollCurrent)
out.writeString(searchScrollTime)
out.writeString(priSearchScrollTime)
out.writeString(searchScrollTotal)
out.writeString(priSearchScrollTotal)
out.writeString(searchPointInTimeCurrent)
out.writeString(priSearchPointInTimeCurrent)
out.writeString(searchPointInTimeTime)
out.writeString(priSearchPointInTimeTime)
out.writeString(searchPointInTimeTotal)
out.writeString(priSearchPointInTimeTotal)
out.writeString(segmentsCount)
out.writeString(priSegmentsCount)
out.writeString(segmentsMemory)
out.writeString(priSegmentsMemory)
out.writeString(segmentsIndexWriterMemory)
out.writeString(priSegmentsIndexWriterMemory)
out.writeString(segmentsVersionMapMemory)
out.writeString(priSegmentsVersionMapMemory)
out.writeString(segmentsFixedBitsetMemory)
out.writeString(priSegmentsFixedBitsetMemory)
out.writeString(warmerCurrent)
out.writeString(priWarmerCurrent)
out.writeString(warmerTotal)
out.writeString(priWarmerTotal)
out.writeString(warmerTotalTime)
out.writeString(priWarmerTotalTime)
out.writeString(suggestCurrent)
out.writeString(priSuggestCurrent)
out.writeString(suggestTime)
out.writeString(priSuggestTime)
out.writeString(suggestTotal)
out.writeString(priSuggestTotal)
out.writeString(memoryTotal)
out.writeString(priMemoryTotal)
out.writeString(searchThrottled)

Check warning on line 856 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatIndicesHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatIndicesHelpers.kt#L720-L856

Added lines #L720 - L856 were not covered by tests
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
if (pathParams.isNotBlank()) {
indicesList = pathParams.split(",").toTypedArray()

require(validate() == null) { "The path parameters do not form a valid, comma-separated list of data streams, indices, or index aliases." }
require(validate() == null) {
"The path parameters do not form a valid, comma-separated list of data streams, indices, or index aliases."
}

clusterStateRequest = clusterStateRequest.indices(*indicesList)
indicesStatsRequest = indicesStatsRequest.indices(*indicesList)
Expand Down Expand Up @@ -85,7 +87,7 @@
}

override fun writeTo(out: StreamOutput) {
out.writeList(shardInfoList)

Check warning on line 90 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt#L90

Added line #L90 was not covered by tests
}

override fun toXContent(builder: XContentBuilder, params: ToXContent.Params): XContentBuilder {
Expand All @@ -103,7 +105,7 @@
return func.apply(t)
}
}
return null

Check warning on line 108 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt#L108

Added line #L108 was not covered by tests
}

private fun compileShardInfo(
Expand Down Expand Up @@ -173,7 +175,8 @@
searchScrollTotal = getOrNull(commonStats, CommonStats::getSearch, { it.total.scrollCount })?.toString(),
segmentsCount = getOrNull(commonStats, CommonStats::getSegments, SegmentsStats::getCount)?.toString(),
segmentsMemory = getOrNull(commonStats, CommonStats::getSegments, SegmentsStats::getZeroMemory)?.toString(),
segmentsIndexWriterMemory = getOrNull(commonStats, CommonStats::getSegments, SegmentsStats::getIndexWriterMemory)?.toString(),
segmentsIndexWriterMemory =
getOrNull(commonStats, CommonStats::getSegments, SegmentsStats::getIndexWriterMemory)?.toString(),
segmentsVersionMapMemory = getOrNull(commonStats, CommonStats::getSegments, SegmentsStats::getVersionMapMemory)?.toString(),
fixedBitsetMemory = getOrNull(commonStats, CommonStats::getSegments, SegmentsStats::getBitsetMemory)?.toString(),
globalCheckpoint = getOrNull(shardStats, ShardStats::getSeqNoStats, SeqNoStats::getGlobalCheckpoint)?.toString(),
Expand All @@ -192,12 +195,12 @@
node.append(stateResp.state.nodes().get(id).name)

if (shard.relocating()) {
val reloNodeId = shard.relocatingNodeId()
val reloName = stateResp.state.nodes().get(reloNodeId).name
node.append(" -> ")
node.append(reloNodeId)
node.append(" ")
node.append(reloName)

Check warning on line 203 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt#L198-L203

Added lines #L198 - L203 were not covered by tests
}

shardInfo = shardInfo.copy(
Expand All @@ -207,18 +210,19 @@
}

if (shard.unassignedInfo() != null) {
val unassignedTime = Instant.ofEpochMilli(shard.unassignedInfo().unassignedTimeInMillis)
shardInfo = shardInfo.copy(
unassignedReason = shard.unassignedInfo().reason.name,
unassignedAt = UnassignedInfo.DATE_TIME_FORMATTER.format(unassignedTime),

Check warning on line 216 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt#L213-L216

Added lines #L213 - L216 were not covered by tests
unassignedFor = TimeValue.timeValueMillis(System.currentTimeMillis() - shard.unassignedInfo().unassignedTimeInMillis).stringRep,
unassignedFor =
TimeValue.timeValueMillis(System.currentTimeMillis() - shard.unassignedInfo().unassignedTimeInMillis).stringRep,
unassignedDetails = shard.unassignedInfo().details

Check warning on line 219 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt#L218-L219

Added lines #L218 - L219 were not covered by tests
)
}

if (shard.recoverySource() != null) {
shardInfo = shardInfo.copy(
recoverySourceType = shard.recoverySource().type.toString().lowercase(Locale.ROOT)

Check warning on line 225 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt#L224-L225

Added lines #L224 - L225 were not covered by tests
)
}

Expand Down Expand Up @@ -424,68 +428,68 @@
}

override fun writeTo(out: StreamOutput) {
out.writeString(index)
out.writeString(shard)
out.writeString(primaryOrReplica)
out.writeString(state)
out.writeString(docs)
out.writeString(store)
out.writeString(id)
out.writeString(node)
out.writeString(completionSize)
out.writeString(fieldDataMemory)
out.writeString(fieldDataEvictions)
out.writeString(flushTotal)
out.writeString(flushTotalTime)
out.writeString(getCurrent)
out.writeString(getTime)
out.writeString(getTotal)
out.writeString(getExistsTime)
out.writeString(getExistsTotal)
out.writeString(getMissingTime)
out.writeString(getMissingTotal)
out.writeString(indexingDeleteCurrent)
out.writeString(indexingDeleteTime)
out.writeString(indexingDeleteTotal)
out.writeString(indexingIndexCurrent)
out.writeString(indexingIndexTime)
out.writeString(indexingIndexTotal)
out.writeString(indexingIndexFailed)
out.writeString(mergesCurrent)
out.writeString(mergesCurrentDocs)
out.writeString(mergesCurrentSize)
out.writeString(mergesTotal)
out.writeString(mergesTotalDocs)
out.writeString(mergesTotalSize)
out.writeString(mergesTotalTime)
out.writeString(queryCacheMemory)
out.writeString(queryCacheEvictions)
out.writeString(recoverySourceType)
out.writeString(refreshTotal)
out.writeString(refreshTime)
out.writeString(searchFetchCurrent)
out.writeString(searchFetchTime)
out.writeString(searchFetchTotal)
out.writeString(searchOpenContexts)
out.writeString(searchQueryCurrent)
out.writeString(searchQueryTime)
out.writeString(searchQueryTotal)
out.writeString(searchScrollCurrent)
out.writeString(searchScrollTime)
out.writeString(searchScrollTotal)
out.writeString(segmentsCount)
out.writeString(segmentsMemory)
out.writeString(segmentsIndexWriterMemory)
out.writeString(segmentsVersionMapMemory)
out.writeString(fixedBitsetMemory)
out.writeString(globalCheckpoint)
out.writeString(localCheckpoint)
out.writeString(maxSeqNo)
out.writeString(syncId)
out.writeString(unassignedAt)
out.writeString(unassignedDetails)
out.writeString(unassignedFor)
out.writeString(unassignedReason)

Check warning on line 492 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/CatShardsHelpers.kt#L431-L492

Added lines #L431 - L492 were not covered by tests
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse
import org.opensearch.action.admin.indices.stats.IndicesStatsResponse
import org.opensearch.alerting.opensearchapi.convertToMap
import org.opensearch.alerting.opensearchapi.suspendUntil
import org.opensearch.alerting.settings.SupportedClusterMetricsSettings
import org.opensearch.alerting.settings.SupportedClusterMetricsSettings.Companion.resolveToActionRequest
import org.opensearch.client.Client
Expand All @@ -43,49 +42,49 @@
* @param client The [Client] used to call the respective transport action.
* @throws IllegalArgumentException When the requested API is not supported by this feature.
*/
suspend fun executeTransportAction(clusterMetricsInput: ClusterMetricsInput, client: Client): ActionResponse {
fun executeTransportAction(clusterMetricsInput: ClusterMetricsInput, client: Client): ActionResponse {
val request = resolveToActionRequest(clusterMetricsInput)
return when (clusterMetricsInput.clusterMetricType) {
ClusterMetricsInput.ClusterMetricType.CAT_INDICES -> {
request as CatIndicesRequestWrapper
val healthResponse: ClusterHealthResponse =
client.suspendUntil { admin().cluster().health(request.clusterHealthRequest) }
client.admin().cluster().health(request.clusterHealthRequest).get()
val indexSettingsResponse: GetSettingsResponse =
client.suspendUntil { client.admin().indices().getSettings(request.indexSettingsRequest) }
client.admin().indices().getSettings(request.indexSettingsRequest).get()
val indicesResponse: IndicesStatsResponse =
client.suspendUntil { client.admin().indices().stats(request.indicesStatsRequest) }
client.admin().indices().stats(request.indicesStatsRequest).get()
val stateResponse: ClusterStateResponse =
client.suspendUntil { client.admin().cluster().state(request.clusterStateRequest) }
client.admin().cluster().state(request.clusterStateRequest).get()
return CatIndicesResponseWrapper(healthResponse, stateResponse, indexSettingsResponse, indicesResponse)
}
ClusterMetricsInput.ClusterMetricType.CAT_PENDING_TASKS ->
client.suspendUntil { client.admin().cluster().pendingClusterTasks(request as PendingClusterTasksRequest) }
client.admin().cluster().pendingClusterTasks(request as PendingClusterTasksRequest).get()

Check warning on line 61 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt#L61

Added line #L61 was not covered by tests
ClusterMetricsInput.ClusterMetricType.CAT_RECOVERY ->
client.suspendUntil { client.admin().indices().recoveries(request as RecoveryRequest) }
client.admin().indices().recoveries(request as RecoveryRequest).get()

Check warning on line 63 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt#L63

Added line #L63 was not covered by tests
ClusterMetricsInput.ClusterMetricType.CAT_SHARDS -> {
request as CatShardsRequestWrapper
val stateResponse: ClusterStateResponse =
client.suspendUntil { client.admin().cluster().state(request.clusterStateRequest) }
client.admin().cluster().state(request.clusterStateRequest).get()
val indicesResponse: IndicesStatsResponse =
client.suspendUntil { client.admin().indices().stats(request.indicesStatsRequest) }
client.admin().indices().stats(request.indicesStatsRequest).get()
return CatShardsResponseWrapper(stateResponse, indicesResponse)
}
ClusterMetricsInput.ClusterMetricType.CAT_SNAPSHOTS ->
client.suspendUntil { client.admin().cluster().getSnapshots(request as GetSnapshotsRequest) }
client.admin().cluster().getSnapshots(request as GetSnapshotsRequest).get()

Check warning on line 73 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt#L73

Added line #L73 was not covered by tests
ClusterMetricsInput.ClusterMetricType.CAT_TASKS ->
client.suspendUntil { client.admin().cluster().listTasks(request as ListTasksRequest) }
client.admin().cluster().listTasks(request as ListTasksRequest).get()

Check warning on line 75 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt#L75

Added line #L75 was not covered by tests
ClusterMetricsInput.ClusterMetricType.CLUSTER_HEALTH ->
client.suspendUntil { client.admin().cluster().health(request as ClusterHealthRequest) }
client.admin().cluster().health(request as ClusterHealthRequest).get()
ClusterMetricsInput.ClusterMetricType.CLUSTER_SETTINGS -> {
val stateResponse: ClusterStateResponse =
client.suspendUntil { client.admin().cluster().state(request as ClusterStateRequest) }
client.admin().cluster().state(request as ClusterStateRequest).get()
val metadata: Metadata = stateResponse.state.metadata

Check warning on line 81 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt#L79-L81

Added lines #L79 - L81 were not covered by tests
return ClusterGetSettingsResponse(metadata.persistentSettings(), metadata.transientSettings(), Settings.EMPTY)
}
ClusterMetricsInput.ClusterMetricType.CLUSTER_STATS ->
client.suspendUntil { client.admin().cluster().clusterStats(request as ClusterStatsRequest) }
client.admin().cluster().clusterStats(request as ClusterStatsRequest).get()
ClusterMetricsInput.ClusterMetricType.NODES_STATS ->
client.suspendUntil { client.admin().cluster().nodesStats(request as NodesStatsRequest) }
client.admin().cluster().nodesStats(request as NodesStatsRequest).get()

Check warning on line 87 in alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt

View check run for this annotation

Codecov / codecov/patch

alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt#L87

Added line #L87 was not covered by tests
else -> throw IllegalArgumentException("Unsupported API request type: ${request.javaClass.name}")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CatIndicesWrappersIT : OpenSearchSingleNodeTestCase() {
assertThrows(IllegalArgumentException::class.java) { CatIndicesRequestWrapper(pathParams = pathParams) }
}

suspend fun `test CatIndicesResponseWrapper returns with only indices in pathParams`() {
fun `test CatIndicesResponseWrapper returns with only indices in pathParams`() {
// GIVEN
val testIndices = (1..5).map {
"test-index${randomAlphaOfLength(10).lowercase()}" to randomIntBetween(1, 10)
Expand Down Expand Up @@ -125,7 +125,7 @@ class CatIndicesWrappersIT : OpenSearchSingleNodeTestCase() {
}
}

suspend fun `test CatIndicesResponseWrapper returns with all indices when empty pathParams`() {
fun `test CatIndicesResponseWrapper returns with all indices when empty pathParams`() {
// GIVEN
val testIndices = (1..5).map {
"test-index${randomAlphaOfLength(10).lowercase()}" to randomIntBetween(1, 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CatShardsWrappersIT : OpenSearchSingleNodeTestCase() {
assertThrows(IllegalArgumentException::class.java) { CatShardsRequestWrapper(pathParams = pathParams) }
}

suspend fun `test CatShardsResponseWrapper returns with only indices in pathParams`() {
fun `test CatShardsResponseWrapper returns with only indices in pathParams`() {
// GIVEN
val testIndices = (1..5).map {
"test-index${randomAlphaOfLength(10).lowercase()}" to randomIntBetween(1, 10)
Expand Down Expand Up @@ -117,7 +117,7 @@ class CatShardsWrappersIT : OpenSearchSingleNodeTestCase() {
}
}

suspend fun `test CatShardsResponseWrapper returns with all indices when empty pathParams`() {
fun `test CatShardsResponseWrapper returns with all indices when empty pathParams`() {
// GIVEN
val testIndices = (1..5).map {
"test-index${randomAlphaOfLength(10).lowercase()}" to randomIntBetween(1, 10)
Expand Down
Loading