parent
5b87d7a2c4
commit
64e1e4a0a8
|
|
@ -10,3 +10,44 @@
|
|||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
.idea/
|
||||
samples/skywalking-auth/skywalking-auth.iml
|
||||
samples/skywalking-auth/target/
|
||||
skywalking-alarm/skywalking-alarm.iml
|
||||
skywalking-alarm/target/
|
||||
skywalking-analysis/skywalking-analysis.iml
|
||||
skywalking-analysis/target/
|
||||
skywalking-collector/skywalking-agent/dependency-reduced-pom.xml
|
||||
skywalking-collector/skywalking-agent/skywalking-agent.iml
|
||||
skywalking-collector/skywalking-agent/target/
|
||||
skywalking-collector/skywalking-api/skywalking-api.iml
|
||||
skywalking-collector/skywalking-collector.iml
|
||||
skywalking-collector/skywalking-log/example/example.iml
|
||||
skywalking-collector/skywalking-log/log4j-1.x-plugin/skywalking-log4j-1.x-plugin.iml
|
||||
skywalking-collector/skywalking-log/log4j-2.x-plugin/skywalking-log4j-2.x-plugin.iml
|
||||
skywalking-collector/skywalking-log/skywalking-log.iml
|
||||
skywalking-collector/skywalking-protocol/skywalking-protocol.iml
|
||||
skywalking-collector/skywalking-sdk-plugin/dubbo-plugin/skywalking-dubbo-plugin.iml
|
||||
skywalking-collector/skywalking-sdk-plugin/dubbo-plugin/target/
|
||||
skywalking-collector/skywalking-sdk-plugin/httpClient-4.x-plugin/skywalking-httpClient-4.x-plugin.iml
|
||||
skywalking-collector/skywalking-sdk-plugin/httpClient-4.x-plugin/target/
|
||||
skywalking-collector/skywalking-sdk-plugin/jdbc-plugin/skywalking-jdbc-plugin.iml
|
||||
skywalking-sdk-plugin/jdbc-plugin/target/
|
||||
skywalking-collector/skywalking-sdk-plugin/jedis-2.x-plugin/skywalking-jedis-2.x-plugin.iml
|
||||
skywalking-collector/skywalking-sdk-plugin/jedis-2.x-plugin/target/
|
||||
skywalking-collector/skywalking-sdk-plugin/spring-plugin/skywalking-spring-plugin.iml
|
||||
skywalking-collector/skywalking-sdk-plugin/spring-plugin/target/
|
||||
skywalking-collector/skywalking-sdk-plugin/web-plugin/skywalking-web-plugin.iml
|
||||
skywalking-collector/skywalking-sdk-plugin/web-plugin/target/
|
||||
skywalking-server/target/
|
||||
skywalking-webui/skywalking-webui.iml
|
||||
skywalking.iml
|
||||
test/skywalking-agent-test/.idea/
|
||||
test/skywalking-agent-test/dubbo-test/
|
||||
test/skywalking-agent-test/jdbc-test/jdbc-test.iml
|
||||
test/skywalking-agent-test/redis-test/redis-test.iml
|
||||
test/skywalking-test-api/skywalking-test-api.iml
|
||||
test/skywalking-test-api/target/
|
||||
skywalking-collector/skywalking-sdk-plugin/jdbc-plugin/target/
|
||||
.gitignore
|
||||
skywalking-collector/skywalking-log/logback-plugin/logback-plugin.iml
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
AbstractHttpClientPluginDefine
|
||||
InternalHttpClientPluginDefine
|
||||
MinimalHttpClientPluginDefine
|
||||
DefaultRequestDirectorPluginDefine
|
||||
com.ai.cloud.skywalking.httpClient.v4.plugin.define.AbstractHttpClientPluginDefine
|
||||
com.ai.cloud.skywalking.httpClient.v4.plugin.define.InternalHttpClientPluginDefine
|
||||
com.ai.cloud.skywalking.httpClient.v4.plugin.define.MinimalHttpClientPluginDefine
|
||||
com.ai.cloud.skywalking.httpClient.v4.plugin.define.DefaultRequestDirectorPluginDefine
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.ai.cloud.skywalking.agent.test.mysql;
|
||||
|
||||
import com.ai.skywalking.testframework.api.TraceTreeAssert;
|
||||
import com.ai.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
|
@ -25,13 +25,12 @@ public class JDBCPluginTest {
|
|||
p0.execute();
|
||||
con.commit();
|
||||
con.close();
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "preaparedStatement.executeUpdate:select 1 from dual where 1=?"},
|
||||
{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "connection.commit"},
|
||||
{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "connection.close"},
|
||||
}, true);
|
||||
RequestSpanAssert.assertEquals(
|
||||
new String[][] {{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "preaparedStatement.executeUpdate:select 1 from dual where 1=?"},
|
||||
{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "connection.commit"},
|
||||
{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "connection.close"},}, true);
|
||||
|
||||
TraceTreeAssert.clearTraceData();
|
||||
RequestSpanAssert.clearTraceData();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -46,12 +45,11 @@ public class JDBCPluginTest {
|
|||
p0.execute();
|
||||
con.commit();
|
||||
con.close();
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "preaparedStatement.executeUpdate:select 1 from dual where 1=?"},
|
||||
{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "connection.commit"},
|
||||
{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "connection.close"},
|
||||
}, true);
|
||||
RequestSpanAssert.assertEquals(
|
||||
new String[][] {{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "preaparedStatement.executeUpdate:select 1 from dual where 1=?"},
|
||||
{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "connection.commit"},
|
||||
{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "connection.close"},}, true);
|
||||
|
||||
TraceTreeAssert.clearTraceData();
|
||||
RequestSpanAssert.clearTraceData();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,65 +1,66 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ai.cloud</groupId>
|
||||
<artifactId>skywalking-agent-test</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-Final</version>
|
||||
<groupId>com.ai.cloud</groupId>
|
||||
<artifactId>skywalking-agent-test</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-Final</version>
|
||||
|
||||
<name>skywalking-agent-test</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<name>skywalking-agent-test</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<modules>
|
||||
<module>redis-test</module>
|
||||
<module>jdbc-test</module>
|
||||
</modules>
|
||||
<modules>
|
||||
<module>redis-test</module>
|
||||
<module>jdbc-test</module>
|
||||
<module>dubbo-test</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ai.cloud</groupId>
|
||||
<artifactId>skywalking-test-api</artifactId>
|
||||
<version>1.0-Final</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.4.3</version>
|
||||
<configuration>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ai.cloud</groupId>
|
||||
<artifactId>skywalking-test-api</artifactId>
|
||||
<version>1.0-Final</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.4.3</version>
|
||||
<configuration>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
package com.ai.cloud.skywalking.agent.test;
|
||||
|
||||
import com.ai.skywalking.testframework.api.TraceTreeAssert;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RedisClusterPluginTest {
|
||||
|
||||
@After
|
||||
public void clearData(){
|
||||
TraceTreeAssert.clearTraceData();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testSetData() {
|
||||
RedisClusterOperator.setData("key1", "value1");
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
// 根据实际情况进行修改
|
||||
{"0.0", "127.0.0.1:7001 set", "key=key1"},
|
||||
{"0", "127.0.0.1:7001;127.0.0.1:7000; set", "key=key1"},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetData() {
|
||||
RedisClusterOperator.getData("key1");
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
// 根据实际情况进行修改
|
||||
{"0.0", "127.0.0.1:7001 get", "key=key1"},
|
||||
{"0", "127.0.0.1:7001;127.0.0.1:7000; get", "key=key1"},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDelData() {
|
||||
RedisClusterOperator.delData("key1");
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
// 根据实际情况进行修改
|
||||
{"0.0", "127.0.0.1:7001 del", "key=key1"},
|
||||
{"0", "127.0.0.1:7001;127.0.0.1:7000; del", "key=key1"},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.ai.cloud.skywalking.agent.test;
|
||||
|
||||
import com.ai.skywalking.testframework.api.TraceTreeAssert;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RedisPluginTest {
|
||||
|
||||
@After
|
||||
public void clearData(){
|
||||
TraceTreeAssert.clearTraceData();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetData() throws Exception {
|
||||
RedisOperator.setData("key1", "value1");
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
{"0", "127.0.0.1:6379 set", "key=key1"},
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetData() throws Exception {
|
||||
RedisOperator.getData("key1");
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
{"0", "127.0.0.1:6379 get", "key=key1"},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDelData() throws Exception {
|
||||
RedisOperator.delData("key1");
|
||||
TraceTreeAssert.assertEquals(new String[][]{
|
||||
{"0", "127.0.0.1:6379 del", "key=key1"},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.ai.cloud.skywalking.agent.test;
|
||||
|
||||
import com.ai.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RedisClusterPluginTest {
|
||||
|
||||
@After
|
||||
public void clearData() {
|
||||
RequestSpanAssert.clearTraceData();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testSetData() {
|
||||
RedisClusterOperator.setData("key1", "value1");
|
||||
RequestSpanAssert.assertEquals(new String[][] {
|
||||
// 根据实际情况进行修改
|
||||
{"0.0", "127.0.0.1:7001 set", "key=key1"}, {"0", "127.0.0.1:7001;127.0.0.1:7000; set", "key=key1"},});
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetData() {
|
||||
RedisClusterOperator.getData("key1");
|
||||
RequestSpanAssert.assertEquals(new String[][] {
|
||||
// 根据实际情况进行修改
|
||||
{"0.0", "127.0.0.1:7001 get", "key=key1"}, {"0", "127.0.0.1:7001;127.0.0.1:7000; get", "key=key1"},});
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDelData() {
|
||||
RedisClusterOperator.delData("key1");
|
||||
RequestSpanAssert.assertEquals(new String[][] {
|
||||
// 根据实际情况进行修改
|
||||
{"0.0", "127.0.0.1:7001 del", "key=key1"}, {"0", "127.0.0.1:7001;127.0.0.1:7000; del", "key=key1"},});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.ai.cloud.skywalking.agent.test;
|
||||
|
||||
|
||||
import com.ai.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RedisPluginTest {
|
||||
|
||||
@After
|
||||
public void clearData() {
|
||||
RequestSpanAssert.clearTraceData();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetData() throws Exception {
|
||||
RedisOperator.setData("key1", "value1");
|
||||
RequestSpanAssert.assertEquals(new String[][] {{"0", "127.0.0.1:6379 set", "key=key1"},});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetData() throws Exception {
|
||||
RedisOperator.getData("key1");
|
||||
RequestSpanAssert.assertEquals(new String[][] {{"0", "127.0.0.1:6379 get", "key=key1"},});
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDelData() throws Exception {
|
||||
RedisOperator.delData("key1");
|
||||
RequestSpanAssert.assertEquals(new String[][] {{"0", "127.0.0.1:6379 del", "key=key1"},});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue