Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Renames plugin name to normalized name set by infra; cleans up tests (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dbbaughe authored Jan 25, 2021
1 parent 6245828 commit 4b1b571
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (!usingRemoteCluster && !usingMultiNode) {
check.dependsOn jacocoTestReport

esplugin {
name 'opendistro_index_management'
name 'opendistro-index-management'
description 'Open Distro Index Management Plugin'
classname 'com.amazon.opendistroforelasticsearch.indexmanagement.IndexManagementPlugin'
extendedPlugins = ['opendistro-job-scheduler']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ abstract class ODFERestTestCase : ESRestTestCase() {

override fun getProtocol(): String = if (isHttps()) "https" else "http"

// override fun preserveIndicesUponCompletion(): Boolean = true

@Suppress("UNCHECKED_CAST")
@Throws(IOException::class)
private fun runningTasks(response: Response): MutableSet<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class IndexStateManagementRestApiIT : IndexStateManagementRestTestCase() {
val plugins = nodeInfo["plugins"] as List<Map<String, Any>>

for (plugin in plugins) {
if (plugin["name"] == "opendistro_index_management") {
if (plugin["name"] == "opendistro-index-management") {
hasIndexStateMangementPlugin = true
}
if (plugin["name"] == "opendistro-job-scheduler") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class RestGetRollupActionIT : RollupRestTestCase() {
// Doesn't matter what rollup sets, current system is at schema version 5
assertEquals(6, (innerRollup["schema_version"] as Int).toLong())
assertEquals(testRollup.enabled, innerRollup["enabled"] as Boolean)
assertEquals(testRollup.enabledTime?.toEpochMilli(), innerRollup["enabled_time"] as Long?)
assertEquals(testRollup.enabledTime?.toEpochMilli(), (innerRollup["enabled_time"] as Number?)?.toLong())
// Last updated time will never be correct as it gets updated in the API call
// assertEquals(testRollup.lastUpdateTime.toEpochMilli(), innerRollup["last_updated_time"] as Long)
assertEquals(testRollup.continuous, innerRollup["continuous"] as Boolean)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class RollupRunnerIT : RollupRestTestCase() {
// Update rollup start time to run second execution
updateRollupStartTime(rollup)

waitFor(Instant.ofEpochSecond(20)) {
waitFor() {
val rollupJob = getRollup(rollupId = rollup.id)
assertNotNull("Rollup job not found", rollupJob)
assertNotNull("Rollup job doesn't have metadata set", rollupJob.metadataID)
Expand Down Expand Up @@ -308,7 +308,7 @@ class RollupRunnerIT : RollupRestTestCase() {

waitFor { assertTrue("Target rollup index was not created", indexExists(rollup.targetIndex)) }

val finishedRollup = waitFor(Instant.ofEpochSecond(20)) {
val finishedRollup = waitFor() {
val rollupJob = getRollup(rollupId = rollup.id)
assertNotNull("Rollup job doesn't have metadata set", rollupJob.metadataID)
val rollupMetadata = getRollupMetadata(rollupJob.metadataID!!)
Expand All @@ -318,7 +318,7 @@ class RollupRunnerIT : RollupRestTestCase() {

updateRollupStartTime(secondRollup)

val secondFinishedRollup = waitFor(Instant.ofEpochSecond(20)) {
val secondFinishedRollup = waitFor() {
val rollupJob = getRollup(rollupId = secondRollup.id)
assertNotNull("Rollup job doesn't have metadata set", rollupJob.metadataID)
val rollupMetadata = getRollupMetadata(rollupJob.metadataID!!)
Expand All @@ -328,7 +328,7 @@ class RollupRunnerIT : RollupRestTestCase() {

updateRollupStartTime(thirdRollup)

val thirdFinishedRollup = waitFor(Instant.ofEpochSecond(20)) {
val thirdFinishedRollup = waitFor() {
val rollupJob = getRollup(rollupId = thirdRollup.id)
assertNotNull("Rollup job doesn't have metadata set", rollupJob.metadataID)
val rollupMetadata = getRollupMetadata(rollupJob.metadataID!!)
Expand Down

0 comments on commit 4b1b571

Please sign in to comment.