|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2014 the original author or authors. |
|
|
|
* Copyright 2002-2015 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -20,6 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger; |
|
|
|
|
|
|
|
|
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.aop.support.AopUtils; |
|
|
|
import org.springframework.aop.support.AopUtils; |
|
|
|
import org.springframework.beans.factory.BeanCreationException; |
|
|
|
import org.springframework.beans.factory.BeanCreationException; |
|
|
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext; |
|
|
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext; |
|
|
|
@ -61,10 +62,10 @@ public class ScheduledAndTransactionalAnnotationIntegrationTests { |
|
|
|
ctx.register(Config.class, JdkProxyTxConfig.class, RepoConfigA.class); |
|
|
|
ctx.register(Config.class, JdkProxyTxConfig.class, RepoConfigA.class); |
|
|
|
try { |
|
|
|
try { |
|
|
|
ctx.refresh(); |
|
|
|
ctx.refresh(); |
|
|
|
fail("expected exception"); |
|
|
|
fail("Should have thrown BeanCreationException"); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (BeanCreationException ex) { |
|
|
|
catch (BeanCreationException ex) { |
|
|
|
assertTrue(ex.getRootCause().getMessage().startsWith("@Scheduled method 'scheduled' found")); |
|
|
|
assertTrue(ex.getRootCause() instanceof IllegalStateException); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|