[MNG-8341] Add IT for deadlock during model building (#394)

This commit is contained in:
Guillaume Nodet 2024-10-25 10:29:16 +02:00 committed by GitHub
parent fc444a4dec
commit 94049cd8c5
6 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,48 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-8341">MNG-8341</a>.
*/
class MavenITmng8341DeadlockTest extends AbstractMavenIntegrationTestCase {
MavenITmng8341DeadlockTest() {
super("[4.0.0-beta-6,)");
}
/**
* Verify that the build succeeds
*/
@Test
void testDeadlock() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-8341-deadlock");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
}
}

View File

@ -120,6 +120,7 @@ public class TestSuiteOrdering implements ClassOrderer {
* the tests are to finishing. Newer tests are also more likely to fail, so this is
* a fail fast technique as well.
*/
suite.addTestSuite(MavenITmng8341DeadlockTest.class);
suite.addTestSuite(MavenITmng8331VersionedAndUnversionedDependenciesTest.class);
suite.addTestSuite(MavenITmng8299CustomLifecycleTest.class);
suite.addTestSuite(MavenITmng7982DependencyManagementTransitivityTest.class);

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0-beta-4.xsd">
<parent>
<groupId>org.apache.maven.its.mng8341</groupId>
<artifactId>parent</artifactId>
<version>1-SNAPSHOT</version>
</parent>
<artifactId>child1</artifactId>
<packaging>pom</packaging>
</project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0-beta-4.xsd">
<parent>
<groupId>org.apache.maven.its.mng8341</groupId>
<artifactId>parent</artifactId>
<version>1-SNAPSHOT</version>
</parent>
<artifactId>child2</artifactId>
<packaging>pom</packaging>
</project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0-beta-4.xsd">
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>33</version>
<relativePath />
</parent>
<groupId>org.apache.maven.its.mng8341</groupId>
<artifactId>parent</artifactId>
<version>1-SNAPSHOT</version>
<packaging>pom</packaging>
</project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" root="true" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0-beta-4.xsd">
<parent>
<groupId>org.apache.maven.its.mng8341</groupId>
<artifactId>parent</artifactId>
<version>1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.its</groupId>
<artifactId>root</artifactId>
<version>1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>parent</module>
<module>child1</module>
<module>child2</module>
</modules>
</project>