Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
superrain51
apollo
提交
f754dc26
apollo
项目概览
superrain51
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f754dc26
编写于
3月 18, 2018
作者:
N
nobodyiam
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
abandon AllTests.java and fix some potential test issues
上级
2f23140b
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
9 addition
and
246 deletion
+9
-246
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/AllTests.java
...ava/com/ctrip/framework/apollo/adminservice/AllTests.java
+0
-26
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AbstractIntegrationTest.java
...m/ctrip/framework/apollo/biz/AbstractIntegrationTest.java
+1
-1
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AbstractUnitTest.java
...java/com/ctrip/framework/apollo/biz/AbstractUnitTest.java
+1
-1
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AllTests.java
...rc/test/java/com/ctrip/framework/apollo/biz/AllTests.java
+0
-49
apollo-client/src/test/java/com/ctrip/framework/apollo/AllTests.java
...nt/src/test/java/com/ctrip/framework/apollo/AllTests.java
+0
-48
apollo-common/src/test/java/com/ctrip/framework/apollo/common/AllTests.java
...test/java/com/ctrip/framework/apollo/common/AllTests.java
+0
-16
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/AllTests.java
...va/com/ctrip/framework/apollo/configservice/AllTests.java
+0
-36
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/NotificationControllerV2Test.java
...onfigservice/controller/NotificationControllerV2Test.java
+5
-2
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/AbstractBaseIntegrationTest.java
...onfigservice/integration/AbstractBaseIntegrationTest.java
+2
-1
apollo-core/src/test/java/com/ctrip/framework/apollo/AllTests.java
...re/src/test/java/com/ctrip/framework/apollo/AllTests.java
+0
-24
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/AllTests.java
...test/java/com/ctrip/framework/apollo/portal/AllTests.java
+0
-37
pom.xml
pom.xml
+0
-5
未找到文件。
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/AllTests.java
已删除
100644 → 0
浏览文件 @
2f23140b
package
com.ctrip.framework.apollo.adminservice
;
import
com.ctrip.framework.apollo.adminservice.aop.NamespaceLockTest
;
import
com.ctrip.framework.apollo.adminservice.aop.NamespaceUnlockAspectTest
;
import
com.ctrip.framework.apollo.adminservice.controller.AppControllerTest
;
import
com.ctrip.framework.apollo.adminservice.controller.AppNamespaceControllerTest
;
import
com.ctrip.framework.apollo.adminservice.controller.ControllerExceptionTest
;
import
com.ctrip.framework.apollo.adminservice.controller.ControllerIntegrationExceptionTest
;
import
com.ctrip.framework.apollo.adminservice.controller.InstanceConfigControllerTest
;
import
com.ctrip.framework.apollo.adminservice.controller.ItemSetControllerTest
;
import
com.ctrip.framework.apollo.adminservice.controller.ReleaseControllerTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
AppControllerTest
.
class
,
ReleaseControllerTest
.
class
,
ItemSetControllerTest
.
class
,
ControllerExceptionTest
.
class
,
ControllerIntegrationExceptionTest
.
class
,
NamespaceLockTest
.
class
,
InstanceConfigControllerTest
.
class
,
AppNamespaceControllerTest
.
class
,
NamespaceUnlockAspectTest
.
class
})
public
class
AllTests
{
}
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AbstractIntegrationTest.java
浏览文件 @
f754dc26
...
...
@@ -12,6 +12,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@WebIntegrationTest
(
randomPort
=
true
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
public
class
AbstractIntegrationTest
{
public
abstract
class
AbstractIntegrationTest
{
}
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AbstractUnitTest.java
浏览文件 @
f754dc26
...
...
@@ -4,6 +4,6 @@ import org.junit.runner.RunWith;
import
org.mockito.runners.MockitoJUnitRunner
;
@RunWith
(
MockitoJUnitRunner
.
class
)
public
class
AbstractUnitTest
{
public
abstract
class
AbstractUnitTest
{
}
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AllTests.java
已删除
100644 → 0
浏览文件 @
2f23140b
package
com.ctrip.framework.apollo.biz
;
import
com.ctrip.framework.apollo.biz.config.BizConfigTest
;
import
com.ctrip.framework.apollo.biz.grayReleaseRule.GrayReleaseRulesHolderTest
;
import
com.ctrip.framework.apollo.biz.message.DatabaseMessageSenderTest
;
import
com.ctrip.framework.apollo.biz.message.ReleaseMessageScannerTest
;
import
com.ctrip.framework.apollo.biz.repository.AppNamespaceRepositoryTest
;
import
com.ctrip.framework.apollo.biz.repository.AppRepositoryTest
;
import
com.ctrip.framework.apollo.biz.service.AdminServiceTest
;
import
com.ctrip.framework.apollo.biz.service.AdminServiceTransactionTest
;
import
com.ctrip.framework.apollo.biz.service.ClusterServiceTest
;
import
com.ctrip.framework.apollo.biz.service.InstanceServiceTest
;
import
com.ctrip.framework.apollo.biz.service.NamespaceBranchServiceTest
;
import
com.ctrip.framework.apollo.biz.service.NamespacePublishInfoTest
;
import
com.ctrip.framework.apollo.biz.service.NamespaceServiceIntegrationTest
;
import
com.ctrip.framework.apollo.biz.service.NamespaceServiceTest
;
import
com.ctrip.framework.apollo.biz.service.ReleaseCreationTest
;
import
com.ctrip.framework.apollo.biz.service.ReleaseServiceTest
;
import
com.ctrip.framework.apollo.biz.service.BizDBPropertySourceTest
;
import
com.ctrip.framework.apollo.biz.utils.ReleaseKeyGeneratorTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
AppRepositoryTest
.
class
,
AppNamespaceRepositoryTest
.
class
,
AdminServiceTest
.
class
,
AdminServiceTransactionTest
.
class
,
DatabaseMessageSenderTest
.
class
,
BizDBPropertySourceTest
.
class
,
ReleaseServiceTest
.
class
,
ReleaseMessageScannerTest
.
class
,
ClusterServiceTest
.
class
,
ReleaseKeyGeneratorTest
.
class
,
InstanceServiceTest
.
class
,
GrayReleaseRulesHolderTest
.
class
,
NamespaceBranchServiceTest
.
class
,
ReleaseCreationTest
.
class
,
NamespacePublishInfoTest
.
class
,
NamespaceServiceIntegrationTest
.
class
,
BizConfigTest
.
class
,
NamespaceServiceTest
.
class
})
public
class
AllTests
{
}
apollo-client/src/test/java/com/ctrip/framework/apollo/AllTests.java
已删除
100644 → 0
浏览文件 @
2f23140b
package
com.ctrip.framework.apollo
;
import
com.ctrip.framework.apollo.integration.ConfigIntegrationTest
;
import
com.ctrip.framework.apollo.internals.DefaultConfigManagerTest
;
import
com.ctrip.framework.apollo.internals.DefaultConfigTest
;
import
com.ctrip.framework.apollo.internals.JsonConfigFileTest
;
import
com.ctrip.framework.apollo.internals.LocalFileConfigRepositoryTest
;
import
com.ctrip.framework.apollo.internals.PropertiesConfigFileTest
;
import
com.ctrip.framework.apollo.internals.RemoteConfigLongPollServiceTest
;
import
com.ctrip.framework.apollo.internals.RemoteConfigRepositoryTest
;
import
com.ctrip.framework.apollo.internals.SimpleConfigTest
;
import
com.ctrip.framework.apollo.internals.XmlConfigFileTest
;
import
com.ctrip.framework.apollo.spi.DefaultConfigFactoryManagerTest
;
import
com.ctrip.framework.apollo.spi.DefaultConfigFactoryTest
;
import
com.ctrip.framework.apollo.spi.DefaultConfigRegistryTest
;
import
com.ctrip.framework.apollo.spring.BootstrapConfigTest
;
import
com.ctrip.framework.apollo.spring.JavaConfigAnnotationTest
;
import
com.ctrip.framework.apollo.spring.JavaConfigPlaceholderAutoUpdateTest
;
import
com.ctrip.framework.apollo.spring.JavaConfigPlaceholderTest
;
import
com.ctrip.framework.apollo.spring.XMLConfigAnnotationTest
;
import
com.ctrip.framework.apollo.spring.XmlConfigPlaceholderAutoUpdateTest
;
import
com.ctrip.framework.apollo.spring.XmlConfigPlaceholderTest
;
import
com.ctrip.framework.apollo.spring.config.ConfigPropertySourceTest
;
import
com.ctrip.framework.apollo.spring.property.PlaceholderHelperTest
;
import
com.ctrip.framework.apollo.util.ConfigUtilTest
;
import
com.ctrip.framework.apollo.util.ExceptionUtilTest
;
import
com.ctrip.framework.apollo.util.parser.DateParserTest
;
import
com.ctrip.framework.apollo.util.parser.DurationParserTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
ConfigServiceTest
.
class
,
DefaultConfigRegistryTest
.
class
,
DefaultConfigFactoryManagerTest
.
class
,
DefaultConfigManagerTest
.
class
,
DefaultConfigTest
.
class
,
LocalFileConfigRepositoryTest
.
class
,
RemoteConfigRepositoryTest
.
class
,
SimpleConfigTest
.
class
,
DefaultConfigFactoryTest
.
class
,
ConfigIntegrationTest
.
class
,
ExceptionUtilTest
.
class
,
XmlConfigFileTest
.
class
,
PropertiesConfigFileTest
.
class
,
RemoteConfigLongPollServiceTest
.
class
,
DateParserTest
.
class
,
DurationParserTest
.
class
,
JsonConfigFileTest
.
class
,
XmlConfigPlaceholderTest
.
class
,
JavaConfigPlaceholderTest
.
class
,
XMLConfigAnnotationTest
.
class
,
JavaConfigAnnotationTest
.
class
,
ConfigUtilTest
.
class
,
BootstrapConfigTest
.
class
,
JavaConfigPlaceholderAutoUpdateTest
.
class
,
XmlConfigPlaceholderAutoUpdateTest
.
class
,
ConfigPropertySourceTest
.
class
,
PlaceholderHelperTest
.
class
})
public
class
AllTests
{
}
apollo-common/src/test/java/com/ctrip/framework/apollo/common/AllTests.java
已删除
100644 → 0
浏览文件 @
2f23140b
package
com.ctrip.framework.apollo.common
;
import
com.ctrip.framework.apollo.common.conditional.ConditionalOnProfileTest
;
import
com.ctrip.framework.apollo.common.utils.InputValidatorTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
InputValidatorTest
.
class
,
ConditionalOnProfileTest
.
class
})
public
class
AllTests
{
}
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/AllTests.java
已删除
100644 → 0
浏览文件 @
2f23140b
package
com.ctrip.framework.apollo.configservice
;
import
com.ctrip.framework.apollo.configservice.controller.ConfigControllerTest
;
import
com.ctrip.framework.apollo.configservice.controller.ConfigFileControllerTest
;
import
com.ctrip.framework.apollo.configservice.controller.NotificationControllerTest
;
import
com.ctrip.framework.apollo.configservice.controller.NotificationControllerV2Test
;
import
com.ctrip.framework.apollo.configservice.integration.ConfigControllerIntegrationTest
;
import
com.ctrip.framework.apollo.configservice.integration.ConfigFileControllerIntegrationTest
;
import
com.ctrip.framework.apollo.configservice.integration.NotificationControllerIntegrationTest
;
import
com.ctrip.framework.apollo.configservice.integration.NotificationControllerV2IntegrationTest
;
import
com.ctrip.framework.apollo.configservice.service.AppNamespaceServiceWithCacheTest
;
import
com.ctrip.framework.apollo.configservice.service.ReleaseMessageServiceWithCacheTest
;
import
com.ctrip.framework.apollo.configservice.service.config.ConfigServiceWithCacheTest
;
import
com.ctrip.framework.apollo.configservice.service.config.DefaultConfigServiceTest
;
import
com.ctrip.framework.apollo.configservice.util.InstanceConfigAuditUtilTest
;
import
com.ctrip.framework.apollo.configservice.util.NamespaceUtilTest
;
import
com.ctrip.framework.apollo.configservice.util.WatchKeysUtilTest
;
import
com.ctrip.framework.apollo.configservice.wrapper.CaseInsensitiveMapWrapperTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
ConfigControllerTest
.
class
,
NotificationControllerTest
.
class
,
ConfigControllerIntegrationTest
.
class
,
NotificationControllerIntegrationTest
.
class
,
NamespaceUtilTest
.
class
,
ConfigFileControllerTest
.
class
,
ConfigFileControllerIntegrationTest
.
class
,
WatchKeysUtilTest
.
class
,
NotificationControllerV2Test
.
class
,
NotificationControllerV2IntegrationTest
.
class
,
InstanceConfigAuditUtilTest
.
class
,
AppNamespaceServiceWithCacheTest
.
class
,
ReleaseMessageServiceWithCacheTest
.
class
,
DefaultConfigServiceTest
.
class
,
ConfigServiceWithCacheTest
.
class
,
CaseInsensitiveMapWrapperTest
.
class
})
public
class
AllTests
{
}
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/NotificationControllerV2Test.java
浏览文件 @
f754dc26
...
...
@@ -35,6 +35,7 @@ import java.util.Objects;
import
java.util.concurrent.TimeUnit
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
times
;
...
...
@@ -342,11 +343,13 @@ public class NotificationControllerV2Test {
controller
.
handleMessage
(
someReleaseMessage
,
Topics
.
APOLLO_RELEASE_TOPIC
);
assertTrue
(!
anotherDeferredResult
.
hasResult
());
//in batch mode, at most one of them should have result
assertFalse
(
deferredResult
.
hasResult
()
&&
anotherDeferredResult
.
hasResult
());
TimeUnit
.
MILLISECONDS
.
sleep
(
someBatchInterval
*
10
);
assertTrue
(
anotherDeferredResult
.
hasResult
());
//now both of them should have result
assertTrue
(
deferredResult
.
hasResult
()
&&
anotherDeferredResult
.
hasResult
());
}
private
String
transformApolloConfigNotificationsToString
(
...
...
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/AbstractBaseIntegrationTest.java
浏览文件 @
f754dc26
...
...
@@ -114,7 +114,8 @@ public abstract class AbstractBaseIntegrationTest {
private
static
class
TestBizConfig
extends
BizConfig
{
@Override
public
int
appNamespaceCacheScanInterval
()
{
return
50
;
//should be short enough to update the AppNamespace cache in time
return
1
;
}
@Override
...
...
apollo-core/src/test/java/com/ctrip/framework/apollo/AllTests.java
已删除
100644 → 0
浏览文件 @
2f23140b
package
com.ctrip.framework.apollo
;
import
com.ctrip.framework.apollo.foundation.FoundationTest
;
import
com.ctrip.framework.apollo.foundation.internals.ServiceBootstrapTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
import
com.ctrip.framework.apollo.core.MetaDomainTest
;
import
com.ctrip.framework.apollo.foundation.internals.provider.DefaultApplicationProviderTest
;
import
com.ctrip.framework.apollo.foundation.internals.provider.DefaultServerProviderTest
;
import
com.ctrip.framework.apollo.tracer.TracerTest
;
import
com.ctrip.framework.apollo.tracer.internals.DefaultMessageProducerManagerTest
;
import
com.ctrip.framework.apollo.tracer.internals.NullMessageProducerManagerTest
;
import
com.ctrip.framework.apollo.tracer.internals.NullMessageProducerTest
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
MetaDomainTest
.
class
,
ServiceBootstrapTest
.
class
,
NullMessageProducerManagerTest
.
class
,
NullMessageProducerTest
.
class
,
DefaultMessageProducerManagerTest
.
class
,
TracerTest
.
class
,
DefaultApplicationProviderTest
.
class
,
DefaultServerProviderTest
.
class
,
FoundationTest
.
class
})
public
class
AllTests
{
}
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/AllTests.java
已删除
100644 → 0
浏览文件 @
2f23140b
package
com.ctrip.framework.apollo.portal
;
import
com.ctrip.framework.apollo.openapi.filter.ConsumerAuthenticationFilterTest
;
import
com.ctrip.framework.apollo.openapi.service.ConsumerRolePermissionServiceTest
;
import
com.ctrip.framework.apollo.openapi.service.ConsumerServiceTest
;
import
com.ctrip.framework.apollo.openapi.util.ConsumerAuditUtilTest
;
import
com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtilTest
;
import
com.ctrip.framework.apollo.portal.component.txtresolver.FileTextResolverTest
;
import
com.ctrip.framework.apollo.portal.component.txtresolver.PropertyResolverTest
;
import
com.ctrip.framework.apollo.portal.config.ConfigTest
;
import
com.ctrip.framework.apollo.portal.service.AppNamespaceServiceTest
;
import
com.ctrip.framework.apollo.portal.service.ConfigServiceTest
;
import
com.ctrip.framework.apollo.portal.service.FavoriteServiceTest
;
import
com.ctrip.framework.apollo.portal.service.NamespaceServiceTest
;
import
com.ctrip.framework.apollo.portal.spi.defaultImpl.RoleInitializationServiceTest
;
import
com.ctrip.framework.apollo.portal.spi.defaultImpl.RolePermissionServiceTest
;
import
com.ctrip.framework.apollo.portal.spi.ctrip.CtripUserServiceTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
ConfigServiceTest
.
class
,
PropertyResolverTest
.
class
,
NamespaceServiceTest
.
class
,
ServiceExceptionTest
.
class
,
RolePermissionServiceTest
.
class
,
AppNamespaceServiceTest
.
class
,
RoleInitializationServiceTest
.
class
,
FileTextResolverTest
.
class
,
RetryableRestTemplateTest
.
class
,
ConsumerRolePermissionServiceTest
.
class
,
ConsumerAuthenticationFilterTest
.
class
,
ConsumerAuthUtilTest
.
class
,
ConsumerServiceTest
.
class
,
ConsumerAuditUtilTest
.
class
,
ConfigTest
.
class
,
FavoriteServiceTest
.
class
,
CtripUserServiceTest
.
class
})
public
class
AllTests
{
}
pom.xml
浏览文件 @
f754dc26
...
...
@@ -329,11 +329,6 @@
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
${maven-surefire-plugin.version}
</version>
<configuration>
<includes>
<include>
**/AllTests.java
</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录