use of org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource in project spring-framework by spring-projects.
the class ScriptingDefaultsTests method defaultRefreshCheckDelay.
@Test
public void defaultRefreshCheckDelay() throws Exception {
ApplicationContext context = new ClassPathXmlApplicationContext(CONFIG);
Advised advised = (Advised) context.getBean("testBean");
AbstractRefreshableTargetSource targetSource = ((AbstractRefreshableTargetSource) advised.getTargetSource());
Field field = AbstractRefreshableTargetSource.class.getDeclaredField("refreshCheckDelay");
field.setAccessible(true);
long delay = ((Long) field.get(targetSource)).longValue();
assertEquals(5000L, delay);
}
Aggregations