提交 3990dc3c 编写于 作者: N nobodyiam

increase wait interval for auto update test

上级 a808bc57
...@@ -65,7 +65,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -65,7 +65,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch()); assertEquals(newBatch, bean.getBatch());
...@@ -98,7 +98,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -98,7 +98,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, javaConfigBean.getTimeout()); assertEquals(newTimeout, javaConfigBean.getTimeout());
assertEquals(newBatch, javaConfigBean.getBatch()); assertEquals(newBatch, javaConfigBean.getBatch());
...@@ -135,7 +135,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -135,7 +135,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -165,7 +165,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -165,7 +165,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties); applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -174,7 +174,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -174,7 +174,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties); fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch()); assertEquals(newBatch, bean.getBatch());
...@@ -192,7 +192,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -192,7 +192,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
Properties fxApolloProperties = Properties fxApolloProperties =
assembleProperties(TIMEOUT_PROPERTY, String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch)); assembleProperties(TIMEOUT_PROPERTY, String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch));
SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties); prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties);
SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties); SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig2.class); AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig2.class);
...@@ -207,7 +207,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -207,7 +207,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties); fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewTimeout, bean.getTimeout()); assertEquals(someNewTimeout, bean.getTimeout());
assertEquals(someBatch, bean.getBatch()); assertEquals(someBatch, bean.getBatch());
...@@ -235,7 +235,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -235,7 +235,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties); applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch()); assertEquals(newBatch, bean.getBatch());
...@@ -268,7 +268,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -268,7 +268,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties); applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch()); assertEquals(DEFAULT_BATCH, bean.getBatch());
...@@ -295,7 +295,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -295,7 +295,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(DEFAULT_TIMEOUT, bean.getTimeout()); assertEquals(DEFAULT_TIMEOUT, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch()); assertEquals(DEFAULT_BATCH, bean.getBatch());
...@@ -312,7 +312,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -312,7 +312,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
assembleProperties(TIMEOUT_PROPERTY, String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch)); assembleProperties(TIMEOUT_PROPERTY, String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch));
SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties); SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties);
SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties); prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig2.class); AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig2.class);
...@@ -325,7 +325,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -325,7 +325,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someTimeout, bean.getTimeout()); assertEquals(someTimeout, bean.getTimeout());
assertEquals(anotherBatch, bean.getBatch()); assertEquals(anotherBatch, bean.getBatch());
...@@ -353,7 +353,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -353,7 +353,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -383,7 +383,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -383,7 +383,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -413,7 +413,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -413,7 +413,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario // Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
...@@ -444,7 +444,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -444,7 +444,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario // Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
...@@ -475,7 +475,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -475,7 +475,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario // Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
...@@ -506,7 +506,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -506,7 +506,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario // Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
...@@ -537,7 +537,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -537,7 +537,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewValue, bean.getNestedProperty()); assertEquals(someNewValue, bean.getNestedProperty());
} }
...@@ -565,7 +565,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -565,7 +565,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario // Does not support this scenario
assertEquals(someValue, bean.getNestedProperty()); assertEquals(someValue, bean.getNestedProperty());
...@@ -594,7 +594,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -594,7 +594,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewValue, bean.getNestedProperty()); assertEquals(someNewValue, bean.getNestedProperty());
} }
...@@ -631,7 +631,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -631,7 +631,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewValue, bean.getNestedProperty()); assertEquals(someNewValue, bean.getNestedProperty());
} }
...@@ -713,7 +713,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -713,7 +713,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewInt, bean.getIntProperty()); assertEquals(someNewInt, bean.getIntProperty());
assertArrayEquals(someNewIntArray, bean.getIntArrayProperty()); assertArrayEquals(someNewIntArray, bean.getIntArrayProperty());
...@@ -751,7 +751,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -751,7 +751,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// should not change anything // should not change anything
assertTrue(jsonBean == bean.getJsonBean()); assertTrue(jsonBean == bean.getJsonBean());
...@@ -778,7 +778,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -778,7 +778,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// should not change anything // should not change anything
assertTrue(jsonBean == bean.getJsonBean()); assertTrue(jsonBean == bean.getJsonBean());
...@@ -805,7 +805,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati ...@@ -805,7 +805,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
JsonBean newJsonBean = bean.getJsonBean(); JsonBean newJsonBean = bean.getJsonBean();
......
...@@ -49,7 +49,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -49,7 +49,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch()); assertEquals(newBatch, bean.getBatch());
...@@ -84,7 +84,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -84,7 +84,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -119,7 +119,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -119,7 +119,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
applicationConfig applicationConfig
.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties); .onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -128,7 +128,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -128,7 +128,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties); fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch()); assertEquals(newBatch, bean.getBatch());
...@@ -147,8 +147,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -147,8 +147,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
Properties fxApolloProperties = assembleProperties(TIMEOUT_PROPERTY, Properties fxApolloProperties = assembleProperties(TIMEOUT_PROPERTY,
String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch)); String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch));
SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties);
applicationProperties);
SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties); SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/XmlConfigPlaceholderTest3.xml"); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/XmlConfigPlaceholderTest3.xml");
...@@ -163,7 +162,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -163,7 +162,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties); fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewTimeout, bean.getTimeout()); assertEquals(someNewTimeout, bean.getTimeout());
assertEquals(someBatch, bean.getBatch()); assertEquals(someBatch, bean.getBatch());
...@@ -194,7 +193,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -194,7 +193,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
applicationConfig applicationConfig
.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties); .onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch()); assertEquals(newBatch, bean.getBatch());
...@@ -229,7 +228,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -229,7 +228,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
applicationConfig applicationConfig
.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties); .onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch()); assertEquals(DEFAULT_BATCH, bean.getBatch());
...@@ -256,7 +255,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -256,7 +255,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(DEFAULT_TIMEOUT, bean.getTimeout()); assertEquals(DEFAULT_TIMEOUT, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch()); assertEquals(DEFAULT_BATCH, bean.getBatch());
...@@ -275,7 +274,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -275,7 +274,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION,
applicationProperties); applicationProperties);
SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties); prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/XmlConfigPlaceholderTest3.xml"); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/XmlConfigPlaceholderTest3.xml");
...@@ -288,7 +287,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -288,7 +287,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someTimeout, bean.getTimeout()); assertEquals(someTimeout, bean.getTimeout());
assertEquals(anotherBatch, bean.getBatch()); assertEquals(anotherBatch, bean.getBatch());
...@@ -316,7 +315,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -316,7 +315,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -346,7 +345,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -346,7 +345,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch()); assertEquals(initialBatch, bean.getBatch());
...@@ -376,7 +375,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -376,7 +375,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario // Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout()); assertEquals(initialTimeout, bean.getTimeout());
...@@ -407,7 +406,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -407,7 +406,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout()); assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch()); assertEquals(newBatch, bean.getBatch());
...@@ -483,7 +482,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio ...@@ -483,7 +482,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
TimeUnit.MILLISECONDS.sleep(50); TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewInt, bean.getIntProperty()); assertEquals(someNewInt, bean.getIntProperty());
assertArrayEquals(someNewIntArray, bean.getIntArrayProperty()); assertArrayEquals(someNewIntArray, bean.getIntArrayProperty());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册