Introduce @EnabledForTestGroups in Spring's test suite
Closes gh-23476
This commit is contained in:
@@ -29,11 +29,11 @@ import org.springframework.expression.PropertyAccessor;
|
||||
import org.springframework.expression.TypedValue;
|
||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.tests.EnabledForTestGroups;
|
||||
import org.springframework.util.StopWatch;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestGroup.PERFORMANCE;
|
||||
|
||||
/**
|
||||
* Testing variations on map access.
|
||||
@@ -99,8 +99,8 @@ public class MapAccessTests extends AbstractExpressionTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledForTestGroups(PERFORMANCE)
|
||||
public void testGetValuePerformance() throws Exception {
|
||||
Assume.group(TestGroup.PERFORMANCE);
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("key", "value");
|
||||
EvaluationContext context = new StandardEvaluationContext(map);
|
||||
|
||||
@@ -22,11 +22,11 @@ import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.expression.ExpressionParser;
|
||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.tests.EnabledForTestGroups;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.springframework.tests.TestGroup.PERFORMANCE;
|
||||
|
||||
///CLOVER:OFF
|
||||
|
||||
@@ -35,6 +35,7 @@ import static org.assertj.core.api.Assertions.fail;
|
||||
*
|
||||
* @author Andy Clement
|
||||
*/
|
||||
@EnabledForTestGroups(PERFORMANCE)
|
||||
public class PerformanceTests {
|
||||
|
||||
public static final int ITERATIONS = 10000;
|
||||
@@ -47,8 +48,6 @@ public class PerformanceTests {
|
||||
|
||||
@Test
|
||||
public void testPerformanceOfPropertyAccess() throws Exception {
|
||||
Assume.group(TestGroup.PERFORMANCE);
|
||||
|
||||
long starttime = 0;
|
||||
long endtime = 0;
|
||||
|
||||
@@ -91,8 +90,6 @@ public class PerformanceTests {
|
||||
|
||||
@Test
|
||||
public void testPerformanceOfMethodAccess() throws Exception {
|
||||
Assume.group(TestGroup.PERFORMANCE);
|
||||
|
||||
long starttime = 0;
|
||||
long endtime = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user