diff --git a/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/diagnosticsTests/KotlinSourceSetTreeDependsOnMismatchTest.kt b/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/diagnosticsTests/KotlinSourceSetTreeDependsOnMismatchTest.kt index 59968537bb8..e1768b4262a 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/diagnosticsTests/KotlinSourceSetTreeDependsOnMismatchTest.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/diagnosticsTests/KotlinSourceSetTreeDependsOnMismatchTest.kt @@ -28,7 +28,9 @@ class KotlinSourceSetTreeDependsOnMismatchTest { } } project.evaluate() - return project.kotlinToolingDiagnosticsCollector.getDiagnosticsForProject(project).toList() + return project.kotlinToolingDiagnosticsCollector + .getDiagnosticsForProject(project) + .filter { it.id == KotlinSourceSetTreeDependsOnMismatch.id } // ignore other diagnostics that can appear as well } private fun checkSingleBadSourceSetDependency( @@ -55,9 +57,7 @@ class KotlinSourceSetTreeDependsOnMismatchTest { @Test fun `commonMain cant depend on commonTest`() = checkSingleBadSourceSetDependency( dependent = "commonMain", - dependency = "commonTest", - KotlinSourceSetTreeDependsOnMismatch("commonMain", "commonTest"), - CommonMainWithDependsOnDiagnostic() + dependency = "commonTest" ) @Test