Skip to content

Commit

Permalink
fix mock server ut
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam committed Oct 4, 2018
1 parent 2243da9 commit a8f00d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class ApolloMockServerApiTest {

private static final String otherNamespace = "otherNamespace";
private static final String anotherNamespace = "anotherNamespace";

@ClassRule
public static EmbeddedApollo embeddedApollo = new EmbeddedApollo();
Expand All @@ -31,7 +31,7 @@ public void testGetProperty() throws Exception {
public void testUpdateProperties() throws Exception {
String someNewValue = "someNewValue";

Config otherConfig = ConfigService.getConfig(otherNamespace);
Config otherConfig = ConfigService.getConfig(anotherNamespace);

final SettableFuture<ConfigChangeEvent> future = SettableFuture.create();

Expand All @@ -45,7 +45,7 @@ public void onChange(ConfigChangeEvent changeEvent) {
assertEquals("otherValue1", otherConfig.getProperty("key1", null));
assertEquals("otherValue2", otherConfig.getProperty("key2", null));

embeddedApollo.addOrModifyProperty(otherNamespace, "key1", someNewValue);
embeddedApollo.addOrModifyProperty(anotherNamespace, "key1", someNewValue);

ConfigChangeEvent changeEvent = future.get(5, TimeUnit.SECONDS);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
key1=otherValue1
key2=otherValue2

0 comments on commit a8f00d4

Please sign in to comment.