forked from Kotlin/kotlinx.coroutines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix debug module publication with shadow plugin (Kotlin#3357)
Fixes Kotlin#3345 Fixes Kotlin#3334
- Loading branch information
1 parent
836a4bb
commit b707336
Showing
4 changed files
with
79 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
integration-testing/src/debugDynamicAgentTest/kotlin/DynamicAttachDebugTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2016-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
import org.junit.* | ||
import kotlinx.coroutines.* | ||
import kotlinx.coroutines.debug.* | ||
import org.junit.Test | ||
import java.io.* | ||
import java.lang.IllegalStateException | ||
|
||
class DynamicAttachDebugTest { | ||
|
||
@Test | ||
fun testAgentDumpsCoroutines() = | ||
DebugProbes.withDebugProbes { | ||
runBlocking { | ||
val baos = ByteArrayOutputStream() | ||
DebugProbes.dumpCoroutines(PrintStream(baos)) | ||
// if the agent works, then dumps should contain something, | ||
// at least the fact that this test is running. | ||
Assert.assertTrue(baos.toString().contains("testAgentDumpsCoroutines")) | ||
} | ||
} | ||
|
||
@Test(expected = IllegalStateException::class) | ||
fun testAgentIsNotInstalled() { | ||
DebugProbes.dumpCoroutines(PrintStream(ByteArrayOutputStream())) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters