From c847561f9c523720025dbedd4a8454e7fa825ac6 Mon Sep 17 00:00:00 2001 From: paul-dingemans Date: Sat, 3 Sep 2022 20:21:38 +0200 Subject: [PATCH] Fix unit test Closes #1624 --- ktlint/src/test/kotlin/com/pinterest/ktlint/BaseCLITest.kt | 2 +- ktlint/src/test/kotlin/com/pinterest/ktlint/SimpleCLITest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ktlint/src/test/kotlin/com/pinterest/ktlint/BaseCLITest.kt b/ktlint/src/test/kotlin/com/pinterest/ktlint/BaseCLITest.kt index 2b66a9b5f3..93606da8dd 100644 --- a/ktlint/src/test/kotlin/com/pinterest/ktlint/BaseCLITest.kt +++ b/ktlint/src/test/kotlin/com/pinterest/ktlint/BaseCLITest.kt @@ -151,7 +151,7 @@ abstract class BaseCLITest { companion object { private const val WAIT_INTERVAL_DURATION = 100L - private const val WAIT_INTERVAL_MAX_OCCURRENCES = 100 + private const val WAIT_INTERVAL_MAX_OCCURRENCES = 1000 val testProjectsPath: Path = Paths.get("src", "test", "resources", "cli") const val BASE_DIR_PLACEHOLDER = "__TEMP_DIR__" } diff --git a/ktlint/src/test/kotlin/com/pinterest/ktlint/SimpleCLITest.kt b/ktlint/src/test/kotlin/com/pinterest/ktlint/SimpleCLITest.kt index 77bb3e65dd..82cb9cefd8 100644 --- a/ktlint/src/test/kotlin/com/pinterest/ktlint/SimpleCLITest.kt +++ b/ktlint/src/test/kotlin/com/pinterest/ktlint/SimpleCLITest.kt @@ -69,7 +69,7 @@ class SimpleCLITest : BaseCLITest() { "too-many-empty-lines", listOf("SomeOtherFile.kt"), ) { - assertErrorExitCode() + assertNormalExitCode() assert(normalOutput.find { it.contains("No files matched [SomeOtherFile.kt]") } != null) { "Unexpected output:\n${normalOutput.joinToString(separator = "\n")}"