Commit 22756eb0 by Jason Song

Merge pull request #138 from yiming187/cat_update

exclude cat in client/config/admin/portal test
parents 5483c43f 4b1234df
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
<groupId>com.ctrip.apollo</groupId> <groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-biz</artifactId> <artifactId>apollo-biz</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-buildtools</artifactId>
<scope>test</scope>
</dependency>
<!-- end of apollo --> <!-- end of apollo -->
<!-- eureka --> <!-- eureka -->
<dependency> <dependency>
......
<plexus>
<components>
<component>
<role>com.dianping.cat.configuration.ClientConfigManager</role>
<implementation>com.ctrip.apollo.cat.NullClientConfigManager
</implementation>
</component>
<component>
<role>com.dianping.cat.message.io.TransportManager</role>
<implementation>com.ctrip.apollo.cat.NullTransportManager
</implementation>
</component>
<component>
<role>com.dianping.cat.message.spi.MessageManager</role>
<implementation>com.ctrip.apollo.cat.NullMessageManager
</implementation>
<requirements>
<requirement>
<role>com.dianping.cat.message.internal.MessageIdFactory</role>
</requirement>
</requirements>
</component>
<component>
<role>com.dianping.cat.message.MessageProducer</role>
<implementation>com.ctrip.apollo.cat.NullMessageProducer
</implementation>
<requirements>
<requirement>
<role>com.dianping.cat.message.spi.MessageManager</role>
</requirement>
<requirement>
<role>com.dianping.cat.message.internal.MessageIdFactory</role>
</requirement>
</requirements>
</component>
<component>
<role>org.codehaus.plexus.logging.LoggerManager</role>
<implementation>com.ctrip.apollo.cat.NullLoggerManager
</implementation>
</component>
</components>
</plexus>
\ No newline at end of file
...@@ -13,4 +13,10 @@ ...@@ -13,4 +13,10 @@
<properties> <properties>
<github.path>${project.artifactId}</github.path> <github.path>${project.artifactId}</github.path>
</properties> </properties>
<dependencies>
<dependency>
<groupId>com.dianping.cat</groupId>
<artifactId>cat-client</artifactId>
</dependency>
</dependencies>
</project> </project>
package com.ctrip.apollo.cat; package com.ctrip.apollo.cat;
import java.io.IOException;
import org.codehaus.plexus.logging.LogEnabled; import org.codehaus.plexus.logging.LogEnabled;
import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
import org.unidal.lookup.ContainerHolder; import org.unidal.lookup.ContainerHolder;
import org.unidal.lookup.annotation.Inject;
import com.dianping.cat.message.Message; import com.dianping.cat.message.Message;
import com.dianping.cat.message.Transaction; import com.dianping.cat.message.Transaction;
import com.dianping.cat.message.internal.MessageIdFactory;
import com.dianping.cat.message.spi.MessageManager; import com.dianping.cat.message.spi.MessageManager;
import com.dianping.cat.message.spi.MessageTree; import com.dianping.cat.message.spi.MessageTree;
public class NullMessageManager extends ContainerHolder implements MessageManager, Initializable, LogEnabled{ public class NullMessageManager extends ContainerHolder
implements
MessageManager,
Initializable,
LogEnabled {
@Inject
private MessageIdFactory m_factory;
@Override @Override
public void enableLogging(Logger logger) { public void enableLogging(Logger logger) {
...@@ -20,7 +31,11 @@ public class NullMessageManager extends ContainerHolder implements MessageManage ...@@ -20,7 +31,11 @@ public class NullMessageManager extends ContainerHolder implements MessageManage
@Override @Override
public void initialize() throws InitializationException { public void initialize() throws InitializationException {
try {
m_factory.initialize("localhost");
} catch (IOException e) {
e.printStackTrace();
}
} }
@Override @Override
......
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
<groupId>com.ctrip.apollo</groupId> <groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-core</artifactId> <artifactId>apollo-core</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-buildtools</artifactId>
<scope>test</scope>
</dependency>
<!-- end of apollo --> <!-- end of apollo -->
<!-- foundation service --> <!-- foundation service -->
<dependency> <dependency>
......
...@@ -18,7 +18,6 @@ import org.junit.Test; ...@@ -18,7 +18,6 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock; import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner; import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.stubbing.Answer; import org.mockito.stubbing.Answer;
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
<role>com.dianping.cat.message.spi.MessageManager</role> <role>com.dianping.cat.message.spi.MessageManager</role>
<implementation>com.ctrip.apollo.cat.NullMessageManager <implementation>com.ctrip.apollo.cat.NullMessageManager
</implementation> </implementation>
<requirements>
<requirement>
<role>com.dianping.cat.message.internal.MessageIdFactory</role>
</requirement>
</requirements>
</component> </component>
<component> <component>
<role>com.dianping.cat.message.MessageProducer</role> <role>com.dianping.cat.message.MessageProducer</role>
......
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
<groupId>com.ctrip.apollo</groupId> <groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-biz</artifactId> <artifactId>apollo-biz</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-buildtools</artifactId>
<scope>test</scope>
</dependency>
<!-- end of apollo --> <!-- end of apollo -->
<!-- eureka --> <!-- eureka -->
<dependency> <dependency>
......
<plexus>
<components>
<component>
<role>com.dianping.cat.configuration.ClientConfigManager</role>
<implementation>com.ctrip.apollo.cat.NullClientConfigManager
</implementation>
</component>
<component>
<role>com.dianping.cat.message.io.TransportManager</role>
<implementation>com.ctrip.apollo.cat.NullTransportManager
</implementation>
</component>
<component>
<role>com.dianping.cat.message.spi.MessageManager</role>
<implementation>com.ctrip.apollo.cat.NullMessageManager
</implementation>
<requirements>
<requirement>
<role>com.dianping.cat.message.internal.MessageIdFactory</role>
</requirement>
</requirements>
</component>
<component>
<role>com.dianping.cat.message.MessageProducer</role>
<implementation>com.ctrip.apollo.cat.NullMessageProducer
</implementation>
<requirements>
<requirement>
<role>com.dianping.cat.message.spi.MessageManager</role>
</requirement>
<requirement>
<role>com.dianping.cat.message.internal.MessageIdFactory</role>
</requirement>
</requirements>
</component>
<component>
<role>org.codehaus.plexus.logging.LoggerManager</role>
<implementation>com.ctrip.apollo.cat.NullLoggerManager
</implementation>
</component>
</components>
</plexus>
\ No newline at end of file
...@@ -18,6 +18,11 @@ ...@@ -18,6 +18,11 @@
<groupId>com.ctrip.apollo</groupId> <groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-common</artifactId> <artifactId>apollo-common</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-buildtools</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
<plexus>
<components>
<component>
<role>com.dianping.cat.configuration.ClientConfigManager</role>
<implementation>com.ctrip.apollo.cat.NullClientConfigManager
</implementation>
</component>
<component>
<role>com.dianping.cat.message.io.TransportManager</role>
<implementation>com.ctrip.apollo.cat.NullTransportManager
</implementation>
</component>
<component>
<role>com.dianping.cat.message.spi.MessageManager</role>
<implementation>com.ctrip.apollo.cat.NullMessageManager
</implementation>
<requirements>
<requirement>
<role>com.dianping.cat.message.internal.MessageIdFactory</role>
</requirement>
</requirements>
</component>
<component>
<role>com.dianping.cat.message.MessageProducer</role>
<implementation>com.ctrip.apollo.cat.NullMessageProducer
</implementation>
<requirements>
<requirement>
<role>com.dianping.cat.message.spi.MessageManager</role>
</requirement>
<requirement>
<role>com.dianping.cat.message.internal.MessageIdFactory</role>
</requirement>
</requirements>
</component>
<component>
<role>org.codehaus.plexus.logging.LoggerManager</role>
<implementation>com.ctrip.apollo.cat.NullLoggerManager
</implementation>
</component>
</components>
</plexus>
\ No newline at end of file
...@@ -117,6 +117,11 @@ ...@@ -117,6 +117,11 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-buildtools</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ctrip.framework</groupId> <groupId>com.ctrip.framework</groupId>
<artifactId>framework-foundation</artifactId> <artifactId>framework-foundation</artifactId>
<version>1.1.4</version> <version>1.1.4</version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment