Fix ci-fail.
This commit is contained in:
parent
17d983ba9d
commit
87e4647706
|
|
@ -12,7 +12,7 @@ import java.io.IOException;
|
|||
public class NodeCompIndex extends AbstractIndex {
|
||||
|
||||
public static final String INDEX = "node_comp_idx";
|
||||
public static final String NAME = "NAME";
|
||||
public static final String NAME = "name";
|
||||
public static final String PEERS = "peers";
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class TraceDagDataBuilder {
|
|||
}
|
||||
|
||||
JsonObject dagJsonObj = new JsonObject();
|
||||
dagJsonObj.add("NODES", pointArray);
|
||||
dagJsonObj.add("nodes", pointArray);
|
||||
dagJsonObj.add("nodeRefs", lineArray);
|
||||
return dagJsonObj;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
package com.a.eye.skywalking.collector.worker.node;
|
||||
|
||||
import com.a.eye.skywalking.collector.worker.globaltrace.GlobalTraceIndex;
|
||||
import java.io.IOException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author pengys5
|
||||
*/
|
||||
|
|
@ -21,6 +19,6 @@ public class NodeCompIndexTestCase {
|
|||
@Test
|
||||
public void testBuilder() throws IOException {
|
||||
NodeCompIndex index = new NodeCompIndex();
|
||||
Assert.assertEquals("{\"properties\":{\"NAME\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"peers\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"aggId\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}", index.createMappingBuilder().string());
|
||||
Assert.assertEquals("{\"properties\":{\"name\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"peers\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"aggId\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}", index.createMappingBuilder().string());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class TraceDagDataBuilderTestCase {
|
|||
TraceDagDataBuilder builder = new TraceDagDataBuilder();
|
||||
JsonObject dagJsonObj = builder.build(nodeCompArray, nodeMappingArray, nodeRefArray, resSumArray);
|
||||
|
||||
JsonArray pointArray = dagJsonObj.getAsJsonArray("NODES");
|
||||
JsonArray pointArray = dagJsonObj.getAsJsonArray("nodes");
|
||||
JsonArray lineArray = dagJsonObj.getAsJsonArray("nodeRefs");
|
||||
|
||||
for (int i = 0; i < pointArray.size(); i++) {
|
||||
|
|
@ -47,7 +47,7 @@ public class TraceDagDataBuilderTestCase {
|
|||
}
|
||||
|
||||
private JsonArray nodeCompArrayData() {
|
||||
String str = "[{\"NAME\":\"Tomcat\",\"peers\":\"portal-service\"},{\"NAME\":\"Motan\",\"peers\":\"cache-service\"},{\"NAME\":\"H2\",\"peers\":\"[localhost:-1]\"},{\"NAME\":\"Tomcat\",\"peers\":\"[10.128.35.80:57818]\"},{\"NAME\":\"Redis\",\"peers\":\"[127.0.0.1:6379]\"},{\"NAME\":\"Mysql\",\"peers\":\"[127.0.0.1:3307]\"},{\"NAME\":\"Tomcat\",\"peers\":\"persistence-service\"},{\"NAME\":\"HttpClient\",\"peers\":\"[10.128.35.80:20880]\"},{\"NAME\":\"Motan\",\"peers\":\"[127.0.0.1:8002]\"},{\"NAME\":\"Tomcat\",\"peers\":\"[0:0:0:0:0:0:0:1:57837]\"}]";
|
||||
String str = "[{\"name\":\"Tomcat\",\"peers\":\"portal-service\"},{\"name\":\"Motan\",\"peers\":\"cache-service\"},{\"name\":\"H2\",\"peers\":\"[localhost:-1]\"},{\"name\":\"Tomcat\",\"peers\":\"[10.128.35.80:57818]\"},{\"name\":\"Redis\",\"peers\":\"[127.0.0.1:6379]\"},{\"name\":\"Mysql\",\"peers\":\"[127.0.0.1:3307]\"},{\"name\":\"Tomcat\",\"peers\":\"persistence-service\"},{\"name\":\"HttpClient\",\"peers\":\"[10.128.35.80:20880]\"},{\"name\":\"Motan\",\"peers\":\"[127.0.0.1:8002]\"},{\"name\":\"Tomcat\",\"peers\":\"[0:0:0:0:0:0:0:1:57837]\"}]";
|
||||
JsonArray jsonArray = gson.fromJson(str, JsonArray.class);
|
||||
return jsonArray;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class LogManagerTest {
|
|||
@Before
|
||||
@After
|
||||
public void clear() throws IllegalAccessException {
|
||||
MemberModifier.field(LogManager.class, "resolver").set(null, null);
|
||||
MemberModifier.field(LogManager.class, "RESOLVER").set(null, null);
|
||||
}
|
||||
|
||||
public class TestLogger implements ILog {
|
||||
|
|
|
|||
|
|
@ -1,134 +1,133 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-sniffer</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>3.0.1-2017</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>skywalking-agent</artifactId>
|
||||
<name>skywalking-agent</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<build>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<shadedArtifactAttached>false</shadedArtifactAttached>
|
||||
<createDependencyReducedPom>true</createDependencyReducedPom>
|
||||
<createSourcesJar>true</createSourcesJar>
|
||||
<shadeSourcesContent>true</shadeSourcesContent>
|
||||
<transformers>
|
||||
<transformer>
|
||||
<resource>skywalking-plugin.def</resource>
|
||||
</transformer>
|
||||
<transformer>
|
||||
<manifestEntries>
|
||||
<Premain-Class>${premain.class}</Premain-Class>
|
||||
</manifestEntries>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<artifactSet>
|
||||
<excludes>
|
||||
<exclude>com.lmax:*</exclude>
|
||||
<exclude>org.apache.httpcomponents:*</exclude>
|
||||
<exclude>commons-logging:*</exclude>
|
||||
<exclude>commons-codec:*</exclude>
|
||||
<exclude>*:gson</exclude>
|
||||
</excludes>
|
||||
</artifactSet>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>${shade.net.bytebuddy.source}</pattern>
|
||||
<shadedPattern>${shade.net.bytebuddy.target}</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.10.19</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-module-junit4</artifactId>
|
||||
<version>1.6.4</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>powermock-module-junit4-common</artifactId>
|
||||
<groupId>org.powermock</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-api-mockito</artifactId>
|
||||
<version>1.6.4</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<groupId>org.mockito</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>powermock-api-support</artifactId>
|
||||
<groupId>org.powermock</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>bintray-wu-sheng-sky-walking-repository</id>
|
||||
<name>wu-sheng-sky-walking-repository</name>
|
||||
<url>https://api.bintray.com/maven/wu-sheng/skywalking/com.a.eye.skywalking-agent/;publish=1</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}</shade.net.bytebuddy.target>
|
||||
<shade.package>com.a.eye.skywalking.dependencies</shade.package>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<shade.net.bytebuddy.source>net.bytebuddy</shade.net.bytebuddy.source>
|
||||
<premain.class>com.a.eye.skywalking.agent.SkyWalkingAgent</premain.class>
|
||||
</properties>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-sniffer</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>3.0.1-2017</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>skywalking-agent</artifactId>
|
||||
<name>skywalking-agent</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<build>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<shadedArtifactAttached>false</shadedArtifactAttached>
|
||||
<createDependencyReducedPom>true</createDependencyReducedPom>
|
||||
<createSourcesJar>true</createSourcesJar>
|
||||
<shadeSourcesContent>true</shadeSourcesContent>
|
||||
<transformers>
|
||||
<transformer>
|
||||
<resource>skywalking-plugin.def</resource>
|
||||
</transformer>
|
||||
<transformer>
|
||||
<manifestEntries>
|
||||
<Premain-Class>${premain.class}</Premain-Class>
|
||||
</manifestEntries>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<artifactSet>
|
||||
<excludes>
|
||||
<exclude>com.lmax:*</exclude>
|
||||
<exclude>org.apache.httpcomponents:*</exclude>
|
||||
<exclude>commons-logging:*</exclude>
|
||||
<exclude>commons-codec:*</exclude>
|
||||
<exclude>*:gson</exclude>
|
||||
</excludes>
|
||||
</artifactSet>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>${shade.net.bytebuddy.source}</pattern>
|
||||
<shadedPattern>${shade.net.bytebuddy.target}</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.10.19</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-module-junit4</artifactId>
|
||||
<version>1.6.4</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>powermock-module-junit4-common</artifactId>
|
||||
<groupId>org.powermock</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-api-mockito</artifactId>
|
||||
<version>1.6.4</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<groupId>org.mockito</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>powermock-api-support</artifactId>
|
||||
<groupId>org.powermock</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>bintray-wu-sheng-sky-walking-repository</id>
|
||||
<name>wu-sheng-sky-walking-repository</name>
|
||||
<url>https://api.bintray.com/maven/wu-sheng/skywalking/com.a.eye.skywalking-agent/;publish=1</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}</shade.net.bytebuddy.target>
|
||||
<shade.package>com.a.eye.skywalking.dependencies</shade.package>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<shade.net.bytebuddy.source>net.bytebuddy</shade.net.bytebuddy.source>
|
||||
<premain.class>com.a.eye.skywalking.agent.SkyWalkingAgent</premain.class>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import com.a.eye.skywalking.api.plugin.interceptor.InterceptorException;
|
|||
* @author wusheng
|
||||
*/
|
||||
public class NoConcurrencyAccessObject {
|
||||
private static final String INVOKE_COUNTER_KEY = "__$INVOKE_COUNTER_KEY";
|
||||
private static final String INVOKE_COUNTER_KEY = "__$invokeCounterKey";
|
||||
|
||||
public void whenEnter(EnhancedClassInstanceContext context, Runnable runnable) {
|
||||
if (!context.isContain(INVOKE_COUNTER_KEY)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue