Skip to content

Commit 0899b40

Browse files
committed
Mark UT_InlineIntTest as ignored so it doesn't kill other tests.
1 parent fc5cc07 commit 0899b40

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

selfie-runner-junit5/src/test/kotlin/com/diffplug/selfie/junit5/InlineIntTest.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ package com.diffplug.selfie.junit5
1717

1818
import io.kotest.matchers.shouldBe
1919
import kotlin.test.Test
20+
import org.junit.jupiter.api.AfterAll
2021
import org.junit.jupiter.api.MethodOrderer
2122
import org.junit.jupiter.api.Order
2223
import org.junit.jupiter.api.TestMethodOrder
23-
import org.junitpioneer.jupiter.DisableIfTestFails
2424

2525
/** Write-only test which asserts adding and removing snapshots results in same-class GC. */
2626
@TestMethodOrder(MethodOrderer.OrderAnnotation::class)
27-
@DisableIfTestFails
27+
//@DisableIfTestFails don't disable if test fails because we *have* to run cleanup
2828
class InlineIntTest : Harness("undertest-junit5") {
2929
@Test @Order(1)
3030
fun toBe_TODO() {
31+
ut_mirror().lineWith("@Ignore").setContent("//@Ignore")
3132
ut_mirror().lineWith("expectSelfie").setContent(" expectSelfie(1234).toBe_TODO()")
3233
gradleReadSSFail()
3334
}
@@ -42,5 +43,6 @@ class InlineIntTest : Harness("undertest-junit5") {
4243
@Test @Order(3)
4344
fun cleanup() {
4445
ut_mirror().lineWith("expectSelfie").setContent(" expectSelfie(1234).toBe_TODO()")
46+
ut_mirror().lineWith("//@Ignore").setContent("@Ignore")
4547
}
4648
}

undertest-junit5/src/test/kotlin/undertest/junit5/UT_InlineIntTest.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package undertest.junit5
22
// spotless:off
33
import com.diffplug.selfie.expectSelfie
4+
import kotlin.test.Ignore
45
import kotlin.test.Test
5-
66
// spotless:on
77

8+
@Ignore
89
class UT_InlineIntTest {
910
@Test fun singleInt() {
1011
expectSelfie(1234).toBe_TODO()

0 commit comments

Comments
 (0)