mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[maven] IDEA-364947 testFileProfileActivationInParentPom2 to help troubleshoot flaky testFileProfileActivationInParentPom
GitOrigin-RevId: 9d48785c53ce7bf9f52b720e973c21a3d5b72159
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0d1f399697
commit
aef7f172c2
+61
@@ -804,6 +804,67 @@ class StructureImportingTest : MavenMultiVersionImportingTestCase() {
|
||||
assertModuleLibDeps(mn("project", "m2"), "Maven: junit:junit:4.0")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFileProfileActivationInParentPom2() = runBlocking {
|
||||
assumeMaven4()
|
||||
createProjectPom("""
|
||||
<groupId>test</groupId>
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
<packaging>pom</packaging>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>xxx</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>src/io.properties</exists>
|
||||
</file>
|
||||
</activation>
|
||||
</profile>
|
||||
</profiles>
|
||||
<modules>
|
||||
<module>m1</module>
|
||||
<module>m2</module>
|
||||
</modules>
|
||||
""".trimIndent())
|
||||
|
||||
val m1 =createModulePom("m1", """
|
||||
<groupId>test</groupId>
|
||||
<artifactId>m1</artifactId>
|
||||
<parent>
|
||||
<groupId>test</groupId>
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
""".trimIndent())
|
||||
|
||||
val m2 = createModulePom("m2", """
|
||||
<groupId>test</groupId>
|
||||
<artifactId>m2</artifactId>
|
||||
<parent>
|
||||
<groupId>test</groupId>
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
""".trimIndent())
|
||||
createProjectSubFile("m2/src/io.properties", "")
|
||||
|
||||
importProjectAsync()
|
||||
|
||||
val m1Project = projectsManager.findProject(m1)!!
|
||||
assertSameElements("m1 enabled profiles", m1Project.activatedProfilesIds.enabledProfiles, emptyList())
|
||||
|
||||
val m2Project = projectsManager.findProject(m2)!!
|
||||
assertSameElements("m2 enabled profiles", m2Project.activatedProfilesIds.enabledProfiles, listOf("xxx"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testProjectWithProfiles() = runBlocking {
|
||||
createProjectPom("""
|
||||
|
||||
Reference in New Issue
Block a user