Skip to content

Commit e91f3e3

Browse files
committed
Make test execution more robust
- Execute tests hermetically where possible. This shields the tests from weird interactions with the local network configuration. - Run the integration tests in a fixed time zone. For some reason they fail in Europe/London.
1 parent dadc701 commit e91f3e3

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

integration/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,10 @@
15431543
<java.awt.headless>true</java.awt.headless>
15441544
<test.functional.ServicePort>${test.functional.ServicePort}</test.functional.ServicePort>
15451545
</systemPropertyVariables>
1546+
<environmentVariables>
1547+
<!-- TODO: some tests fail in specific time zones (e.g. Europe/London) -->
1548+
<TZ>PST8PDT</TZ>
1549+
</environmentVariables>
15461550
</configuration>
15471551
</execution>
15481552
</executions>

pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,21 @@
422422
<artifactId>maven-scm-publish-plugin</artifactId>
423423
<version>1.0-beta-2</version>
424424
</plugin>
425+
<plugin>
426+
<groupId>com.github.veithen.maven</groupId>
427+
<artifactId>hermetic-maven-plugin</artifactId>
428+
<version>0.5.0</version>
429+
<executions>
430+
<execution>
431+
<goals>
432+
<goal>generate-policy</goal>
433+
</goals>
434+
<configuration>
435+
<allowCrossProjectAccess>true</allowCrossProjectAccess>
436+
</configuration>
437+
</execution>
438+
</executions>
439+
</plugin>
425440
</plugins>
426441
</build>
427442
<profiles>

samples/transport-sample/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@
5252
</dependencies>
5353
<build>
5454
<plugins>
55+
<plugin>
56+
<groupId>com.github.veithen.maven</groupId>
57+
<artifactId>hermetic-maven-plugin</artifactId>
58+
<configuration>
59+
<!-- TODO: the sample transport writes files to the project root directory -->
60+
<skip>true</skip>
61+
</configuration>
62+
</plugin>
5563
<plugin>
5664
<artifactId>maven-surefire-plugin</artifactId>
5765
<executions>

0 commit comments

Comments
 (0)