Polishing

This commit is contained in:
Sam Brannen
2019-08-22 13:17:07 +02:00
parent 3e2b977d5d
commit a07ce8eb82
8 changed files with 85 additions and 90 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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