diff --git a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java index 18d899c6a19..8bdfb02a715 100644 --- a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java +++ b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java @@ -485,7 +485,7 @@ public void testAutoUpdateWithDeletedPropertiesWithNoDefaultValue() throws Excep config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); - TimeUnit.MILLISECONDS.sleep(100); + TimeUnit.MILLISECONDS.sleep(300); assertEquals(newTimeout, bean.getTimeout()); assertEquals(initialBatch, bean.getBatch()); @@ -515,7 +515,7 @@ public void testAutoUpdateWithTypeMismatch() throws Exception { config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); - TimeUnit.MILLISECONDS.sleep(100); + TimeUnit.MILLISECONDS.sleep(300); assertEquals(newTimeout, bean.getTimeout()); assertEquals(initialBatch, bean.getBatch()); @@ -539,7 +539,7 @@ public void testAutoUpdateWithTypeMismatchWithYamlFile() throws Exception { configFile.onRepositoryChange("application.yaml", readYamlContentAsConfigFileProperties("case5-new.yaml")); - TimeUnit.MILLISECONDS.sleep(100); + TimeUnit.MILLISECONDS.sleep(300); assertEquals(newTimeout, bean.getTimeout()); assertEquals(initialBatch, bean.getBatch()); @@ -907,7 +907,7 @@ public void testAutoUpdateJsonValueWithInvalidValue() throws Exception { config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); - TimeUnit.MILLISECONDS.sleep(100); + TimeUnit.MILLISECONDS.sleep(300); // should not change anything assertTrue(jsonBean == bean.getJsonBean()); @@ -934,7 +934,7 @@ public void testAutoUpdateJsonValueWithNoValueAndNoDefaultValue() throws Excepti config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); - TimeUnit.MILLISECONDS.sleep(100); + TimeUnit.MILLISECONDS.sleep(300); // should not change anything assertTrue(jsonBean == bean.getJsonBean()); diff --git a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java index 1c5336f31a7..275845a05a5 100644 --- a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java +++ b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java @@ -315,7 +315,7 @@ public void testAutoUpdateWithDeletedPropertiesWithNoDefaultValue() throws Excep config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); - TimeUnit.MILLISECONDS.sleep(100); + TimeUnit.MILLISECONDS.sleep(300); assertEquals(newTimeout, bean.getTimeout()); assertEquals(initialBatch, bean.getBatch()); @@ -345,7 +345,7 @@ public void testAutoUpdateWithTypeMismatch() throws Exception { config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties); - TimeUnit.MILLISECONDS.sleep(100); + TimeUnit.MILLISECONDS.sleep(300); assertEquals(newTimeout, bean.getTimeout()); assertEquals(initialBatch, bean.getBatch());