This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
The following commit(s) were added to refs/heads/master by this push: new a1ca15d42 [MNG-8341] Add IT for deadlock during model building (#394) a1ca15d42 is described below commit a1ca15d4290b263ba5f0b055eed0e5ab8c029fb2 Author: Guillaume Nodet <gno...@apache.org> AuthorDate: Fri Oct 25 10:29:16 2024 +0200 [MNG-8341] Add IT for deadlock during model building (#394) --- .../maven/it/MavenITmng8341DeadlockTest.java | 48 ++++++++++++++++++++++ .../org/apache/maven/it/TestSuiteOrdering.java | 1 + .../resources/mng-8341-deadlock/child1/pom.xml | 10 +++++ .../resources/mng-8341-deadlock/child2/pom.xml | 10 +++++ .../resources/mng-8341-deadlock/parent/pom.xml | 13 ++++++ .../src/test/resources/mng-8341-deadlock/pom.xml | 18 ++++++++ 6 files changed, 100 insertions(+) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8341DeadlockTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8341DeadlockTest.java new file mode 100644 index 000000000..d52febe86 --- /dev/null +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8341DeadlockTest.java @@ -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(); + } +} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java index 0acda4fdc..cd917cd2c 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java @@ -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); diff --git a/core-it-suite/src/test/resources/mng-8341-deadlock/child1/pom.xml b/core-it-suite/src/test/resources/mng-8341-deadlock/child1/pom.xml new file mode 100644 index 000000000..ec6599c2e --- /dev/null +++ b/core-it-suite/src/test/resources/mng-8341-deadlock/child1/pom.xml @@ -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> diff --git a/core-it-suite/src/test/resources/mng-8341-deadlock/child2/pom.xml b/core-it-suite/src/test/resources/mng-8341-deadlock/child2/pom.xml new file mode 100644 index 000000000..e2faba1ff --- /dev/null +++ b/core-it-suite/src/test/resources/mng-8341-deadlock/child2/pom.xml @@ -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> diff --git a/core-it-suite/src/test/resources/mng-8341-deadlock/parent/pom.xml b/core-it-suite/src/test/resources/mng-8341-deadlock/parent/pom.xml new file mode 100644 index 000000000..a65623601 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-8341-deadlock/parent/pom.xml @@ -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> diff --git a/core-it-suite/src/test/resources/mng-8341-deadlock/pom.xml b/core-it-suite/src/test/resources/mng-8341-deadlock/pom.xml new file mode 100644 index 000000000..28a7b94a4 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-8341-deadlock/pom.xml @@ -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>