Skip to content

Commit

Permalink
New profile name JenkinsUnitTest and modified script
Browse files Browse the repository at this point in the history
  • Loading branch information
petchris committed Mar 23, 2021
1 parent d3cae65 commit 2b425cb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
6 changes: 6 additions & 0 deletions harvester/heritrix3/heritrix3-monitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
<version>1.6.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.netarchivesuite</groupId>
<artifactId>netarchivesuite-test-utils</artifactId>
<version>6.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@

import javax.servlet.http.HttpServletRequest;

import dk.netarkivet.common.utils.FailsOnBoth;
import org.junit.Assert;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.mockito.Mockito;

import dk.netarkivet.heritrix3.monitor.AcceptLanguageParser.AcceptLanguage;

public class TestAcceptLanguageHeader extends Mockito {

@Test
@Category(FailsOnBoth.class)
public void test_parse() {
HttpServletRequest request;
List<AcceptLanguage> acceptLanguages;
Expand Down
23 changes: 21 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1144,18 +1144,37 @@

<profile>
<!-- JenkinsUnitTest -->
<id>Default</id>
<id>JenkinsUnitTest</id>
<!-- Set profile to be active by default -->
<activation>
<activeByDefault>true</activeByDefault>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
</plugins>
</build>
<properties>
<test.excluded.groups>dk.netarkivet.common.utils.FailsOnJenkins</test.excluded.groups>
</properties>
</profile>
<profile>
<!-- Set profile to localUnitTest -->
<id>LocalUnitTest</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!--<configuration>
<excludedGroups>dk.netarkivet.common.utils.RequiresFileResolver.class</excludedGroups>
</configuration>-->
</plugin>
</plugins>
</build>
<properties>
<test.excluded.groups>dk.netarkivet.common.utils.FailsOnBoth</test.excluded.groups>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion unit_test_only.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mvn test
mvn test -P JenkinsUnitTest

0 comments on commit 2b425cb

Please sign in to comment.