Skip to content

Commit

Permalink
Allow to filter packages and groups in tests more easily (apache#7550)
Browse files Browse the repository at this point in the history
  • Loading branch information
aahmed-se authored Jul 16, 2020
1 parent 6eaf8a6 commit 224f2f5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ $ cd module-name (e.g: pulsar-client)
$ mvn test -Dtest=unit-test-name (e.g: ConsumerBuilderImplTest)
```

Run Selected Test packages:

```bash
$ cd module-name (e.g: pulsar-broker)
$ mvn test -pl module-name -Dinclude=org/apache/pulsar/**/*.java
```

Start standalone Pulsar service:

```bash
Expand Down
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ flexible messaging model and an intuitive client API.</description>
</issueManagement>

<properties>
<!--config keys to congiure test selection -->
<include>*</include>
<exclude/>
<groups/>
<excludedGroups/>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
Expand Down Expand Up @@ -1469,6 +1475,16 @@ flexible messaging model and an intuitive client API.</description>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<includes>
<include>${include}</include>
</includes>
<excludes>
<exclude>${exclude}</exclude>
</excludes>
<groups>${groups}</groups>
<excludedGroups>${excludedGroups}</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 224f2f5

Please sign in to comment.