Ignore performance-sensitive tests by default

Make use of the new JUnit functionality introduced in the previous
commit to 'Assume' that perfomance- and timing-sensitive tests should
run only when TestGroup.PERFORMANCE is selected, i.e. when
-PtestGroups="performance" has been provided at the Gradle command line.

The net effect is that these tests are now ignored by default, which
will result in far fewer false-negative CI build failures due to
resource contention and other external factors that cause slowdowns.

We will set up a dedicated performance CI build to run these tests on
an isolated machine, etc.

Issue: SPR-9984
This commit is contained in:
Phillip Webb
2012-12-11 18:07:48 -08:00
committed by Chris Beams
parent b083bbdec7
commit 60032e0012
11 changed files with 105 additions and 62 deletions

View File

@@ -19,6 +19,8 @@ package org.springframework.expression.spel;
import junit.framework.Assert;
import org.junit.Test;
import org.springframework.build.junit.Assume;
import org.springframework.build.junit.TestGroup;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.Expression;
import org.springframework.expression.ExpressionParser;
@@ -43,6 +45,8 @@ public class PerformanceTests {
@Test
public void testPerformanceOfPropertyAccess() throws Exception {
Assume.group(TestGroup.PERFORMANCE);
long starttime = 0;
long endtime = 0;
@@ -89,7 +93,10 @@ public class PerformanceTests {
}
}
@Test
public void testPerformanceOfMethodAccess() throws Exception {
Assume.group(TestGroup.PERFORMANCE);
long starttime = 0;
long endtime = 0;