Polishing
This commit is contained in:
@@ -45,7 +45,7 @@ public class AspectJCacheAnnotationTests extends AbstractCacheAnnotationTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testMultiEvict(CacheableService<?> service) {
|
||||
protected void testMultiEvict(CacheableService<?> service) {
|
||||
Object o1 = new Object();
|
||||
|
||||
Object r1 = service.multiCache(o1);
|
||||
|
||||
@@ -33,12 +33,12 @@ import org.springframework.core.task.SimpleAsyncTaskExecutor;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.AsyncResult;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.tests.EnabledForTestGroups;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
import org.springframework.util.concurrent.ListenableFuture;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestGroup.PERFORMANCE;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link AnnotationAsyncExecutionAspect}.
|
||||
@@ -46,6 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Ramnivas Laddad
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@EnabledForTestGroups(PERFORMANCE)
|
||||
public class AnnotationAsyncExecutionAspectTests {
|
||||
|
||||
private static final long WAIT_TIME = 1000; //milliseconds
|
||||
@@ -57,8 +58,6 @@ public class AnnotationAsyncExecutionAspectTests {
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
Assume.group(TestGroup.PERFORMANCE);
|
||||
|
||||
executor = new CountingExecutor();
|
||||
AnnotationAsyncExecutionAspect.aspectOf().setExecutor(executor);
|
||||
}
|
||||
@@ -96,8 +95,6 @@ public class AnnotationAsyncExecutionAspectTests {
|
||||
|
||||
@Test
|
||||
public void voidMethodInAsyncClassGetsRoutedAsynchronously() {
|
||||
Assume.group(TestGroup.PERFORMANCE);
|
||||
|
||||
ClassWithAsyncAnnotation obj = new ClassWithAsyncAnnotation();
|
||||
obj.increment();
|
||||
executor.waitForCompletion();
|
||||
|
||||
@@ -21,13 +21,11 @@ import javax.transaction.Transactional;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
import org.springframework.tests.transaction.CallCountingTransactionManager;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -37,8 +35,7 @@ import static org.assertj.core.api.Assertions.assertThatIOException;
|
||||
/**
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(classes = JtaTransactionAspectsTests.Config.class)
|
||||
@SpringJUnitConfig(JtaTransactionAspectsTests.Config.class)
|
||||
public class JtaTransactionAspectsTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user