Skip to content

Commit 1a258eb

Browse files
committed
build: make integration tests work locally, upgrade mvn wrapper, upgrade sonar.maven.plugin, init PmdTestOrchestrator for each PmdIT test run
1 parent 2470dda commit 1a258eb

File tree

8 files changed

+344
-432
lines changed

8 files changed

+344
-432
lines changed

.mvn/wrapper/maven-wrapper.jar

-57.4 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
1719
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
18-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Sonar-PMD is licensed under the [GNU Lesser General Public License, Version 3.0]
4949
Parts of the rule descriptions displayed in SonarQube have been extracted from [PMD](https://pmd.github.io/) and are licensed under a [BSD-style license](https://github.com/pmd/pmd/blob/master/LICENSE).
5050

5151
## Build and test the plugin
52-
To build the plugin and run the integration tests:
52+
To build the plugin and run the integration tests (use java 11):
5353

5454
./mvnw clean verify
5555

integration-test/src/test/java/com/sonar/it/java/suite/PmdIT.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import com.sonar.orchestrator.build.BuildResult;
2424
import com.sonar.orchestrator.build.MavenBuild;
2525
import org.apache.commons.lang3.JavaVersion;
26-
import org.junit.jupiter.api.BeforeAll;
26+
import org.junit.jupiter.api.BeforeEach;
2727
import org.junit.jupiter.api.Test;
2828
import org.junit.jupiter.params.ParameterizedTest;
2929
import org.junit.jupiter.params.provider.EnumSource;
@@ -39,10 +39,11 @@
3939

4040
class PmdIT {
4141

42-
private static final PmdTestOrchestrator ORCHESTRATOR = PmdTestOrchestrator.init();
42+
private PmdTestOrchestrator ORCHESTRATOR;
4343

44-
@BeforeAll
45-
static void startSonar() {
44+
@BeforeEach
45+
void startSonar() {
46+
ORCHESTRATOR = PmdTestOrchestrator.init();
4647
ORCHESTRATOR.start();
4748
}
4849

0 commit comments

Comments
 (0)