Skip to content

Commit

Permalink
scalafmtAll
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Kao <[email protected]>
  • Loading branch information
seankao-az committed Jun 12, 2024
1 parent 4d8cba9 commit 667f5c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class FlintClientBuilderSuite extends AnyFlatSpec with OpenSearchSuite with Matc
}

it should "fail if cannot instantiate metadata log service" in {
val options = openSearchOptions + (FlintOptions.CUSTOM_FLINT_METADATA_LOG_SERVICE_CLASS -> "org.dummy.Class")
val options =
openSearchOptions + (FlintOptions.CUSTOM_FLINT_METADATA_LOG_SERVICE_CLASS -> "org.dummy.Class")
the[RuntimeException] thrownBy {
FlintClientBuilder.build(new FlintOptions(options.asJava))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class FlintMetadataLogITSuite extends OpenSearchTransactionSuite with Matchers {

test("should fail if metadata log index doesn't exists") {
val options = openSearchOptions + (DATA_SOURCE_NAME.key -> "non-exist-datasource")
val flintMetadataLogService = new FlintOpenSearchMetadataLogService(new FlintOptions(options.asJava))
val flintMetadataLogService =
new FlintOpenSearchMetadataLogService(new FlintOptions(options.asJava))

the[IllegalStateException] thrownBy {
flintMetadataLogService.startTransaction(testFlintIndex)
Expand Down Expand Up @@ -78,14 +79,16 @@ class FlintMetadataLogITSuite extends OpenSearchTransactionSuite with Matchers {

test("should not get index metadata log if not exist") {
val options = openSearchOptions + (DATA_SOURCE_NAME.key -> "non-exist-datasource")
val flintMetadataLogService = new FlintOpenSearchMetadataLogService(new FlintOptions(options.asJava))
val flintMetadataLogService =
new FlintOpenSearchMetadataLogService(new FlintOptions(options.asJava))
val metadataLog = flintMetadataLogService.getIndexMetadataLog(testFlintIndex)
metadataLog.isPresent shouldBe false
}

test("should initialize index metadata log if forceInit") {
val options = openSearchOptions + (DATA_SOURCE_NAME.key -> "non-exist-datasource")
val flintMetadataLogService = new FlintOpenSearchMetadataLogService(new FlintOptions(options.asJava))
val flintMetadataLogService =
new FlintOpenSearchMetadataLogService(new FlintOptions(options.asJava))
val metadataLog = flintMetadataLogService.getIndexMetadataLog(testFlintIndex, true)
metadataLog.isPresent shouldBe true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class FlintTransactionITSuite extends OpenSearchTransactionSuite with Matchers {
override def beforeAll(): Unit = {
super.beforeAll()
val options = openSearchOptions + (DATA_SOURCE_NAME.key -> testDataSourceName)
flintMetadataLogService = new FlintOpenSearchMetadataLogService(new FlintOptions(options.asJava))
flintMetadataLogService = new FlintOpenSearchMetadataLogService(
new FlintOptions(options.asJava))
}

test("empty metadata log entry content") {
Expand Down

0 comments on commit 667f5c2

Please sign in to comment.