Commit a8f00d48 authored by nobodyiam's avatar nobodyiam

fix mock server ut

parent 2243da9f
...@@ -14,7 +14,7 @@ import org.junit.Test; ...@@ -14,7 +14,7 @@ import org.junit.Test;
public class ApolloMockServerApiTest { public class ApolloMockServerApiTest {
private static final String otherNamespace = "otherNamespace"; private static final String anotherNamespace = "anotherNamespace";
@ClassRule @ClassRule
public static EmbeddedApollo embeddedApollo = new EmbeddedApollo(); public static EmbeddedApollo embeddedApollo = new EmbeddedApollo();
...@@ -31,7 +31,7 @@ public class ApolloMockServerApiTest { ...@@ -31,7 +31,7 @@ public class ApolloMockServerApiTest {
public void testUpdateProperties() throws Exception { public void testUpdateProperties() throws Exception {
String someNewValue = "someNewValue"; String someNewValue = "someNewValue";
Config otherConfig = ConfigService.getConfig(otherNamespace); Config otherConfig = ConfigService.getConfig(anotherNamespace);
final SettableFuture<ConfigChangeEvent> future = SettableFuture.create(); final SettableFuture<ConfigChangeEvent> future = SettableFuture.create();
...@@ -45,7 +45,7 @@ public class ApolloMockServerApiTest { ...@@ -45,7 +45,7 @@ public class ApolloMockServerApiTest {
assertEquals("otherValue1", otherConfig.getProperty("key1", null)); assertEquals("otherValue1", otherConfig.getProperty("key1", null));
assertEquals("otherValue2", otherConfig.getProperty("key2", null)); assertEquals("otherValue2", otherConfig.getProperty("key2", null));
embeddedApollo.addOrModifyProperty(otherNamespace, "key1", someNewValue); embeddedApollo.addOrModifyProperty(anotherNamespace, "key1", someNewValue);
ConfigChangeEvent changeEvent = future.get(5, TimeUnit.SECONDS); ConfigChangeEvent changeEvent = future.get(5, TimeUnit.SECONDS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment