Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
openSource
apollo
Commits
1b3006be
Commit
1b3006be
authored
Feb 07, 2017
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enlarge sleep interval for ut
parent
3e4ce84c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
NotificationControllerV2Test.java
...onfigservice/controller/NotificationControllerV2Test.java
+1
-1
AppNamespaceServiceWithCacheTest.java
...nfigservice/service/AppNamespaceServiceWithCacheTest.java
+5
-3
ReleaseMessageServiceWithCacheTest.java
...igservice/service/ReleaseMessageServiceWithCacheTest.java
+1
-1
No files found.
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/NotificationControllerV2Test.java
View file @
1b3006be
...
...
@@ -330,7 +330,7 @@ public class NotificationControllerV2Test {
assertTrue
(!
anotherDeferredResult
.
hasResult
());
TimeUnit
.
MILLISECONDS
.
sleep
(
someBatchInterval
*
5
);
TimeUnit
.
MILLISECONDS
.
sleep
(
someBatchInterval
*
10
);
assertTrue
(
anotherDeferredResult
.
hasResult
());
}
...
...
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/service/AppNamespaceServiceWithCacheTest.java
View file @
1b3006be
...
...
@@ -74,6 +74,8 @@ public class AppNamespaceServiceWithCacheTest {
String
anotherPrivateNamespace
=
"anotherPrivateNamespace"
;
long
anotherPrivateNamespaceId
=
3
;
int
sleepInterval
=
scanInterval
*
10
;
AppNamespace
somePrivateAppNamespace
=
assembleAppNamespace
(
somePrivateNamespaceId
,
someAppId
,
somePrivateNamespace
,
false
);
AppNamespace
somePublicAppNamespace
=
assembleAppNamespace
(
somePublicNamespaceId
,
...
...
@@ -116,7 +118,7 @@ public class AppNamespaceServiceWithCacheTest {
somePublicNamespaceId
))).
thenReturn
(
Lists
.
newArrayList
(
somePrivateAppNamespace
,
somePublicAppNamespace
));
scanIntervalTimeUnit
.
sleep
(
s
canInterval
*
3
);
scanIntervalTimeUnit
.
sleep
(
s
leepInterval
);
check
(
Lists
.
newArrayList
(
somePrivateAppNamespace
),
appNamespaceServiceWithCache
.
findByAppIdAndNamespaces
(
someAppId
,
someAppIdNamespaces
));
...
...
@@ -131,7 +133,7 @@ public class AppNamespaceServiceWithCacheTest {
anotherPublicAppNamespace
));
when
(
appNamespaceRepository
.
findAll
(
appNamespaceIds
)).
thenReturn
(
allAppNamespaces
);
scanIntervalTimeUnit
.
sleep
(
s
canInterval
*
3
);
scanIntervalTimeUnit
.
sleep
(
s
leepInterval
);
check
(
Lists
.
newArrayList
(
somePrivateAppNamespace
,
yetAnotherPrivateAppNamespace
,
anotherPublicAppNamespace
),
appNamespaceServiceWithCache
.
findByAppIdAndNamespaces
...
...
@@ -169,7 +171,7 @@ public class AppNamespaceServiceWithCacheTest {
when
(
appNamespaceRepository
.
findAll
(
appNamespaceIds
)).
thenReturn
(
Lists
.
newArrayList
(
somePrivateAppNamespaceNew
,
yetAnotherPrivateAppNamespaceNew
,
somePublicAppNamespaceNew
));
scanIntervalTimeUnit
.
sleep
(
s
canInterval
*
3
);
scanIntervalTimeUnit
.
sleep
(
s
leepInterval
);
check
(
Collections
.
emptyList
(),
appNamespaceServiceWithCache
.
findByAppIdAndNamespaces
(
someAppId
,
someAppIdNamespaces
));
...
...
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/service/ReleaseMessageServiceWithCacheTest.java
View file @
1b3006be
...
...
@@ -177,7 +177,7 @@ public class ReleaseMessageServiceWithCacheTest {
when
(
releaseMessageRepository
.
findFirst500ByIdGreaterThanOrderByIdAsc
(
someMessageId
)).
thenReturn
(
Lists
.
newArrayList
(
newMessage
));
scanIntervalTimeUnit
.
sleep
(
scanInterval
*
3
);
scanIntervalTimeUnit
.
sleep
(
scanInterval
*
10
);
ReleaseMessage
newLatestReleaseMsg
=
releaseMessageServiceWithCache
...
...
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