Browse Source

Polishing

(cherry picked from commit 6c08d93992)
pull/33048/head
Juergen Hoeller 2 years ago
parent
commit
8d1bf9607b
  1. 2
      integration-tests/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java
  2. 3
      integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java
  3. 5
      integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java
  4. 3
      spring-aspects/src/test/resources/org/springframework/cache/config/annotation-jcache-aspectj.xml
  5. 6
      spring-aspects/src/test/resources/org/springframework/scheduling/aspectj/annotationDrivenContext.xml

2
integration-tests/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java vendored

@ -63,7 +63,7 @@ class EnableCachingIntegrationTests {
// attempt was made to look up the AJ aspect. It's due to classpath issues // attempt was made to look up the AJ aspect. It's due to classpath issues
// in integration-tests that it's not found. // in integration-tests that it's not found.
assertThatException().isThrownBy(ctx::refresh) assertThatException().isThrownBy(ctx::refresh)
.withMessageContaining("AspectJCachingConfiguration"); .withMessageContaining("AspectJCachingConfiguration");
} }

3
integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java vendored

@ -542,8 +542,7 @@ public class EnvironmentSystemIntegrationTests {
{ {
ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(); ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.getEnvironment().setRequiredProperties("foo", "bar"); ctx.getEnvironment().setRequiredProperties("foo", "bar");
assertThatExceptionOfType(MissingRequiredPropertiesException.class).isThrownBy( assertThatExceptionOfType(MissingRequiredPropertiesException.class).isThrownBy(ctx::refresh);
ctx::refresh);
} }
{ {

5
integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java

@ -98,9 +98,8 @@ class EnableTransactionManagementIntegrationTests {
// this test is a bit fragile, but gets the job done, proving that an // this test is a bit fragile, but gets the job done, proving that an
// attempt was made to look up the AJ aspect. It's due to classpath issues // attempt was made to look up the AJ aspect. It's due to classpath issues
// in integration-tests that it's not found. // in integration-tests that it's not found.
assertThatException() assertThatException().isThrownBy(ctx::refresh)
.isThrownBy(ctx::refresh) .withMessageContaining("AspectJJtaTransactionManagementConfiguration");
.withMessageContaining("AspectJJtaTransactionManagementConfiguration");
} }
@Test @Test

3
spring-aspects/src/test/resources/org/springframework/cache/config/annotation-jcache-aspectj.xml vendored

@ -24,8 +24,7 @@
</property> </property>
</bean> </bean>
<bean id="defaultCache" <bean id="defaultCache" class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
<property name="name" value="default"/> <property name="name" value="default"/>
</bean> </bean>

6
spring-aspects/src/test/resources/org/springframework/scheduling/aspectj/annotationDrivenContext.xml

@ -7,12 +7,10 @@
http://www.springframework.org/schema/task http://www.springframework.org/schema/task
https://www.springframework.org/schema/task/spring-task.xsd"> https://www.springframework.org/schema/task/spring-task.xsd">
<task:annotation-driven mode="aspectj" executor="testExecutor" <task:annotation-driven mode="aspectj" executor="testExecutor" exception-handler="testExceptionHandler"/>
exception-handler="testExceptionHandler"/>
<task:executor id="testExecutor"/> <task:executor id="testExecutor"/>
<bean id="testExceptionHandler" <bean id="testExceptionHandler" class="org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler"/>
class="org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler"/>
</beans> </beans>

Loading…
Cancel
Save