Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Kao <[email protected]>
  • Loading branch information
seankao-az committed Mar 12, 2024
1 parent 0d76522 commit a655e8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ class FlintTransactionITSuite extends OpenSearchTransactionSuite with Matchers {

test("should get empty if no metadata log entry for index") {
flintClient
.getIndexMetadataLatestLogEntry(testFlintIndex, testDataSourceName)
.isEmpty shouldBe true
.getIndexMetadataLatestLogEntry(testFlintIndex, testDataSourceName) shouldBe empty
}

test("should preserve original values when transition") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ class FlintSparkIndexSqlITSuite extends FlintSparkSuite {
"active"),
Row(testSkippingFlintIndex, "skipping", "default", testTableName, null, false, "active")))

// Show in catalog.database
// Create index in other database
flint
.materializedView()
.name("spark_catalog.default.mv2")
.name("spark_catalog.other.mv2")
.query(testMvQuery)
.create()

// Show in catalog.database shouldn't show index in other database
checkAnswer(
sql(s"SHOW FLINT INDEX IN spark_catalog"),
sql(s"SHOW FLINT INDEX IN spark_catalog.default"),
Seq(
Row(testMvFlintIndex, "mv", "default", null, testMvIndexShortName, false, "active"),
Row(
Expand All @@ -86,21 +87,13 @@ class FlintSparkIndexSqlITSuite extends FlintSparkSuite {
testCoveringIndex,
false,
"active"),
Row(testSkippingFlintIndex, "skipping", "default", testTableName, null, false, "active"),
Row(
FlintSparkMaterializedView.getFlintIndexName("spark_catalog.default.mv2"),
"mv",
"default",
null,
"mv2",
false,
"active")))
Row(testSkippingFlintIndex, "skipping", "default", testTableName, null, false, "active")))

deleteTestIndex(
testMvFlintIndex,
testCoveringFlintIndex,
testSkippingFlintIndex,
FlintSparkMaterializedView.getFlintIndexName("spark_catalog.default.mv2"))
FlintSparkMaterializedView.getFlintIndexName("spark_catalog.other.mv2"))
}

test("should return empty when show flint index in empty database") {
Expand Down Expand Up @@ -128,5 +121,6 @@ class FlintSparkIndexSqlITSuite extends FlintSparkSuite {
testCoveringIndex,
true,
"refreshing")))
deleteTestIndex(testCoveringFlintIndex)
}
}

0 comments on commit a655e8d

Please sign in to comment.