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
6083b6c2
Commit
6083b6c2
authored
Apr 23, 2016
by
Yiming Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable cat in test
parent
52550468
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
289 additions
and
0 deletions
+289
-0
NullClientConfigManager.java
...st/java/com/ctrip/apollo/cat/NullClientConfigManager.java
+58
-0
NullLoggerManager.java
...src/test/java/com/ctrip/apollo/cat/NullLoggerManager.java
+8
-0
NullMessageManager.java
...rc/test/java/com/ctrip/apollo/cat/NullMessageManager.java
+97
-0
NullMessageProducer.java
...c/test/java/com/ctrip/apollo/cat/NullMessageProducer.java
+55
-0
NullTransportManager.java
.../test/java/com/ctrip/apollo/cat/NullTransportManager.java
+33
-0
plexus.xml
apollo-client/src/test/resources/META-INF/plexus/plexus.xml
+38
-0
No files found.
apollo-client/src/test/java/com/ctrip/apollo/cat/NullClientConfigManager.java
0 → 100644
View file @
6083b6c2
package
com
.
ctrip
.
apollo
.
cat
;
import
java.io.File
;
import
java.util.List
;
import
com.dianping.cat.configuration.ClientConfigManager
;
import
com.dianping.cat.configuration.client.entity.Domain
;
import
com.dianping.cat.configuration.client.entity.Server
;
public
class
NullClientConfigManager
implements
ClientConfigManager
{
@Override
public
Domain
getDomain
()
{
return
null
;
}
@Override
public
int
getMaxMessageLength
()
{
return
0
;
}
@Override
public
String
getServerConfigUrl
()
{
return
null
;
}
@Override
public
List
<
Server
>
getServers
()
{
return
null
;
}
@Override
public
int
getTaggedTransactionCacheSize
()
{
return
0
;
}
@Override
public
void
initialize
(
File
configFile
)
throws
Exception
{
}
@Override
public
boolean
isCatEnabled
()
{
return
false
;
}
@Override
public
boolean
isDumpLocked
()
{
return
false
;
}
@Override
public
int
getQueueSize
()
{
return
0
;
}
}
\ No newline at end of file
apollo-client/src/test/java/com/ctrip/apollo/cat/NullLoggerManager.java
0 → 100644
View file @
6083b6c2
package
com
.
ctrip
.
apollo
.
cat
;
import
org.codehaus.plexus.logging.console.ConsoleLoggerManager
;
public
class
NullLoggerManager
extends
ConsoleLoggerManager
{
}
apollo-client/src/test/java/com/ctrip/apollo/cat/NullMessageManager.java
0 → 100644
View file @
6083b6c2
package
com
.
ctrip
.
apollo
.
cat
;
import
org.codehaus.plexus.logging.LogEnabled
;
import
org.codehaus.plexus.logging.Logger
;
import
org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
;
import
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
;
import
org.unidal.lookup.ContainerHolder
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.spi.MessageManager
;
import
com.dianping.cat.message.spi.MessageTree
;
public
class
NullMessageManager
extends
ContainerHolder
implements
MessageManager
,
Initializable
,
LogEnabled
{
@Override
public
void
enableLogging
(
Logger
logger
)
{
}
@Override
public
void
initialize
()
throws
InitializationException
{
}
@Override
public
void
add
(
Message
message
)
{
}
@Override
public
void
end
(
Transaction
transaction
)
{
}
@Override
public
Transaction
getPeekTransaction
()
{
return
null
;
}
@Override
public
MessageTree
getThreadLocalMessageTree
()
{
return
null
;
}
@Override
public
boolean
hasContext
()
{
return
false
;
}
@Override
public
boolean
isMessageEnabled
()
{
return
false
;
}
@Override
public
boolean
isCatEnabled
()
{
return
false
;
}
@Override
public
boolean
isTraceMode
()
{
return
false
;
}
@Override
public
void
reset
()
{
}
@Override
public
void
setTraceMode
(
boolean
traceMode
)
{
}
@Override
public
void
setup
()
{
}
@Override
public
void
start
(
Transaction
transaction
,
boolean
forked
)
{
}
@Override
public
void
bind
(
String
tag
,
String
title
)
{
}
@Override
public
String
getDomain
()
{
return
null
;
}
}
\ No newline at end of file
apollo-client/src/test/java/com/ctrip/apollo/cat/NullMessageProducer.java
0 → 100644
View file @
6083b6c2
package
com
.
ctrip
.
apollo
.
cat
;
import
java.util.Map
;
import
com.dianping.cat.message.internal.DefaultMessageProducer
;
public
class
NullMessageProducer
extends
DefaultMessageProducer
{
@Override
public
void
logError
(
Throwable
cause
)
{
}
@Override
public
void
logError
(
String
message
,
Throwable
cause
)
{
}
@Override
public
void
logEvent
(
String
type
,
String
name
)
{
}
@Override
public
void
logTrace
(
String
type
,
String
name
)
{
}
@Override
public
void
logEvent
(
String
type
,
String
name
,
String
status
,
String
nameValuePairs
)
{
}
@Override
public
void
logTags
(
String
scenario
,
Map
<
String
,
String
>
indexedTags
,
Map
<
String
,
String
>
storedTags
)
{
}
@Override
public
void
logTrace
(
String
type
,
String
name
,
String
status
,
String
nameValuePairs
)
{
}
@Override
public
void
logHeartbeat
(
String
type
,
String
name
,
String
status
,
String
nameValuePairs
)
{
}
@Override
public
void
logMetric
(
String
name
,
String
status
,
String
nameValuePairs
)
{
}
}
apollo-client/src/test/java/com/ctrip/apollo/cat/NullTransportManager.java
0 → 100644
View file @
6083b6c2
package
com
.
ctrip
.
apollo
.
cat
;
import
com.dianping.cat.message.io.MessageSender
;
import
com.dianping.cat.message.io.TransportManager
;
import
com.dianping.cat.message.spi.MessageTree
;
public
class
NullTransportManager
implements
TransportManager
{
private
static
final
MessageSender
nullMessageSender
=
new
MessageSender
()
{
@Override
public
void
initialize
()
{
}
@Override
public
void
send
(
MessageTree
tree
)
{
}
@Override
public
void
shutdown
()
{
}
};
@Override
public
MessageSender
getSender
()
{
return
nullMessageSender
;
}
}
apollo-client/src/test/resources/META-INF/plexus/plexus.xml
0 → 100644
View file @
6083b6c2
<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>
</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
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