Skip to content

Commit

Permalink
[MNG-8341] Add IT
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Oct 24, 2024
1 parent 07ab883 commit c438181
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public TestSuiteOrdering() {
* 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);
Expand Down
10 changes: 10 additions & 0 deletions core-it-suite/src/test/resources/mng-8341-deadlock/child1/pom.xml
Original file line number Diff line number Diff line change
@@ -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>
10 changes: 10 additions & 0 deletions core-it-suite/src/test/resources/mng-8341-deadlock/child2/pom.xml
Original file line number Diff line number Diff line change
@@ -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>
13 changes: 13 additions & 0 deletions core-it-suite/src/test/resources/mng-8341-deadlock/parent/pom.xml
Original file line number Diff line number Diff line change
@@ -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>
18 changes: 18 additions & 0 deletions core-it-suite/src/test/resources/mng-8341-deadlock/pom.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit c438181

Please sign in to comment.