wu-sheng commented on a change in pull request #6103:
URL: https://github.com/apache/skywalking/pull/6103#discussion_r550078035
##########
File path:
apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/plugin/witness/WitnessTest.java
##########
@@ -0,0 +1,27 @@
+package org.apache.skywalking.apm.agent.core.plugin.witness;
+
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.WitnessFinder;
+import org.apache.skywalking.apm.agent.core.plugin.WitnessMethod;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * witness test
+ */
+public class WitnessTest {
+
+ private String className =
"org.apache.skywalking.apm.agent.core.plugin.witness.WitnessTest";
+
+ @Test
+ public void testWitnessClass(){
+ Assert.assertTrue(WitnessFinder.INSTANCE.exist(className,
this.getClass().getClassLoader()));
+ }
+
+ @Test
+ public void testWitnessMethod(){
+ WitnessMethod witnessMethod = new WitnessMethod(className,
ElementMatchers.named("testWitnessMethod"));
Review comment:
Please add more tests also could be as demo about how to set witness
methods with parameter type and return value.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]