From 6dac21b881af258a4ae5a9c8e6e6301fa4406af7 Mon Sep 17 00:00:00 2001 From: YANGDB Date: Wed, 18 Oct 2023 18:08:17 -0700 Subject: [PATCH] update test with removal of test indices Signed-off-by: YANGDB --- .../flint/spark/FlintSparkCoveringIndexSqlITSuite.scala | 3 +++ .../flint/spark/FlintSparkMaterializedViewITSuite.scala | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkCoveringIndexSqlITSuite.scala b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkCoveringIndexSqlITSuite.scala index 288b78308..7e8481464 100644 --- a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkCoveringIndexSqlITSuite.scala +++ b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkCoveringIndexSqlITSuite.scala @@ -251,6 +251,9 @@ class FlintSparkCoveringIndexSqlITSuite extends FlintSparkSuite { settings = parse(flintClient.getIndexMetadata(testFlintIndex).indexSettings.get) (settings \ "index.number_of_shards").extract[String] shouldBe "2" (settings \ "index.number_of_replicas").extract[String] shouldBe "3" + + //remove test index + flint.deleteIndex(targetIndex) } } diff --git a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkMaterializedViewITSuite.scala b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkMaterializedViewITSuite.scala index 902dcb00c..24fbb62ec 100644 --- a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkMaterializedViewITSuite.scala +++ b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkMaterializedViewITSuite.scala @@ -195,7 +195,7 @@ class FlintSparkMaterializedViewITSuite extends FlintSparkSuite { .options(indexOptions) .create() - val index = flint.describeIndex("existing_index") + val index = flint.describeIndex(testTargetIndex) index shouldBe defined index.get.metadata().getContent() should matchJson(s""" | { @@ -230,6 +230,8 @@ class FlintSparkMaterializedViewITSuite extends FlintSparkSuite { | } | } |""".stripMargin) + //remove test index + flint.deleteIndex(testTargetIndex) } private def timestamp(ts: String): Timestamp = Timestamp.valueOf(ts)