Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apollo
Commits
a8f00d48
Commit
a8f00d48
authored
Oct 04, 2018
by
nobodyiam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mock server ut
parent
2243da9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
apollo-mockserver/src/test/java/com/ctrip/framework/apollo/mockserver/ApolloMockServerApiTest.java
.../framework/apollo/mockserver/ApolloMockServerApiTest.java
+3
-3
apollo-mockserver/src/test/resources/mockdata-anotherNamespace.properties
...r/src/test/resources/mockdata-anotherNamespace.properties
+2
-0
No files found.
apollo-mockserver/src/test/java/com/ctrip/framework/apollo/mockserver/ApolloMockServerApiTest.java
View file @
a8f00d48
...
...
@@ -14,7 +14,7 @@ import org.junit.Test;
public
class
ApolloMockServerApiTest
{
private
static
final
String
otherNamespace
=
"
otherNamespace"
;
private
static
final
String
anotherNamespace
=
"an
otherNamespace"
;
@ClassRule
public
static
EmbeddedApollo
embeddedApollo
=
new
EmbeddedApollo
();
...
...
@@ -31,7 +31,7 @@ public class ApolloMockServerApiTest {
public
void
testUpdateProperties
()
throws
Exception
{
String
someNewValue
=
"someNewValue"
;
Config
otherConfig
=
ConfigService
.
getConfig
(
otherNamespace
);
Config
otherConfig
=
ConfigService
.
getConfig
(
an
otherNamespace
);
final
SettableFuture
<
ConfigChangeEvent
>
future
=
SettableFuture
.
create
();
...
...
@@ -45,7 +45,7 @@ public class ApolloMockServerApiTest {
assertEquals
(
"otherValue1"
,
otherConfig
.
getProperty
(
"key1"
,
null
));
assertEquals
(
"otherValue2"
,
otherConfig
.
getProperty
(
"key2"
,
null
));
embeddedApollo
.
addOrModifyProperty
(
otherNamespace
,
"key1"
,
someNewValue
);
embeddedApollo
.
addOrModifyProperty
(
an
otherNamespace
,
"key1"
,
someNewValue
);
ConfigChangeEvent
changeEvent
=
future
.
get
(
5
,
TimeUnit
.
SECONDS
);
...
...
apollo-mockserver/src/test/resources/mockdata-anotherNamespace.properties
0 → 100644
View file @
a8f00d48
key1
=
otherValue1
key2
=
otherValue2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment