-
Task
-
Resolution: Done
-
Major
-
0.1
-
None
Some unit tests are a bit slower than what we normally expect of unit tests. We should add an annotation that can be used with JUnit unit tests to identify long-running tests that can be skipped if the build wants to skip all long-running tests (which we should do by default).
To mark a test method in a JUnit class as long running, annotate it with @SkipLongRunning, and then add the following field to the JUnit class:
@Rule public TestRule skipTestRule = new SkipTestRule();
The build uses the skipLongRunningTests property to define whether the long-running tests should be skipped. By default, the Maven builds such as mvn clean install will skip the long-running tests by setting this property to true, while the "assembly" profile sets the property to false and can be executed with mvn clean install -Passembly.
Meanwhile, the Travis-CI build runs all tests by running the following:
$ mvn clean install -DskipLongRunningTests=false