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
f754dc26
Commit
f754dc26
authored
Mar 18, 2018
by
nobodyiam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abandon AllTests.java and fix some potential test issues
parent
2f23140b
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
9 additions
and
246 deletions
+9
-246
AllTests.java
...ava/com/ctrip/framework/apollo/adminservice/AllTests.java
+0
-26
AbstractIntegrationTest.java
...m/ctrip/framework/apollo/biz/AbstractIntegrationTest.java
+1
-1
AbstractUnitTest.java
...java/com/ctrip/framework/apollo/biz/AbstractUnitTest.java
+1
-1
AllTests.java
...rc/test/java/com/ctrip/framework/apollo/biz/AllTests.java
+0
-49
AllTests.java
...nt/src/test/java/com/ctrip/framework/apollo/AllTests.java
+0
-48
AllTests.java
...test/java/com/ctrip/framework/apollo/common/AllTests.java
+0
-16
AllTests.java
...va/com/ctrip/framework/apollo/configservice/AllTests.java
+0
-36
NotificationControllerV2Test.java
...onfigservice/controller/NotificationControllerV2Test.java
+5
-2
AbstractBaseIntegrationTest.java
...onfigservice/integration/AbstractBaseIntegrationTest.java
+2
-1
AllTests.java
...re/src/test/java/com/ctrip/framework/apollo/AllTests.java
+0
-24
AllTests.java
...test/java/com/ctrip/framework/apollo/portal/AllTests.java
+0
-37
pom.xml
pom.xml
+0
-5
No files found.
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/AllTests.java
deleted
100644 → 0
View file @
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
View file @
f754dc26
...
@@ -12,6 +12,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -12,6 +12,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Transactional
@WebIntegrationTest
(
randomPort
=
true
)
@WebIntegrationTest
(
randomPort
=
true
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
public
class
AbstractIntegrationTest
{
public
abstract
class
AbstractIntegrationTest
{
}
}
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AbstractUnitTest.java
View file @
f754dc26
...
@@ -4,6 +4,6 @@ import org.junit.runner.RunWith;
...
@@ -4,6 +4,6 @@ import org.junit.runner.RunWith;
import
org.mockito.runners.MockitoJUnitRunner
;
import
org.mockito.runners.MockitoJUnitRunner
;
@RunWith
(
MockitoJUnitRunner
.
class
)
@RunWith
(
MockitoJUnitRunner
.
class
)
public
class
AbstractUnitTest
{
public
abstract
class
AbstractUnitTest
{
}
}
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AllTests.java
deleted
100644 → 0
View file @
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
deleted
100644 → 0
View file @
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
deleted
100644 → 0
View file @
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
deleted
100644 → 0
View file @
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
View file @
f754dc26
...
@@ -35,6 +35,7 @@ import java.util.Objects;
...
@@ -35,6 +35,7 @@ import java.util.Objects;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
times
;
import
static
org
.
mockito
.
Mockito
.
times
;
...
@@ -342,11 +343,13 @@ public class NotificationControllerV2Test {
...
@@ -342,11 +343,13 @@ public class NotificationControllerV2Test {
controller
.
handleMessage
(
someReleaseMessage
,
Topics
.
APOLLO_RELEASE_TOPIC
);
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
);
TimeUnit
.
MILLISECONDS
.
sleep
(
someBatchInterval
*
10
);
assertTrue
(
anotherDeferredResult
.
hasResult
());
//now both of them should have result
assertTrue
(
deferredResult
.
hasResult
()
&&
anotherDeferredResult
.
hasResult
());
}
}
private
String
transformApolloConfigNotificationsToString
(
private
String
transformApolloConfigNotificationsToString
(
...
...
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/AbstractBaseIntegrationTest.java
View file @
f754dc26
...
@@ -114,7 +114,8 @@ public abstract class AbstractBaseIntegrationTest {
...
@@ -114,7 +114,8 @@ public abstract class AbstractBaseIntegrationTest {
private
static
class
TestBizConfig
extends
BizConfig
{
private
static
class
TestBizConfig
extends
BizConfig
{
@Override
@Override
public
int
appNamespaceCacheScanInterval
()
{
public
int
appNamespaceCacheScanInterval
()
{
return
50
;
//should be short enough to update the AppNamespace cache in time
return
1
;
}
}
@Override
@Override
...
...
apollo-core/src/test/java/com/ctrip/framework/apollo/AllTests.java
deleted
100644 → 0
View file @
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
deleted
100644 → 0
View file @
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
View file @
f754dc26
...
@@ -329,11 +329,6 @@
...
@@ -329,11 +329,6 @@
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
${maven-surefire-plugin.version}
</version>
<version>
${maven-surefire-plugin.version}
</version>
<configuration>
<includes>
<include>
**/AllTests.java
</include>
</includes>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
...
...
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