Skip to content

Commit

Permalink
Upgrade 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ascrutae committed Sep 22, 2020
1 parent 8c8d733 commit b4f81fe
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 38 deletions.
2 changes: 1 addition & 1 deletion oracle-10.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>

<modules>
<module>oracle-10.x-plugin</module>
Expand All @@ -18,7 +18,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skywalking.version>6.6.0</skywalking.version>
<skywalking.version>8.2.0-SNAPSHOT</skywalking.version>
<shade.package>org.apache.skywalking.apm.dependencies</shade.package>
<shade.net.bytebuddy.source>net.bytebuddy</shade.net.bytebuddy.source>
<shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}</shade.net.bytebuddy.target>
Expand Down
2 changes: 1 addition & 1 deletion resin-3.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>

<groupId>org.apache.skywalking</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.caucho.server.http.HttpResponse;
import io.skywalking.apm.plugin.resin.v3.ResinV3Interceptor;
import java.util.List;
import org.apache.skywalking.apm.agent.core.context.SW6CarrierItem;
import org.apache.skywalking.apm.agent.core.context.SW8CarrierItem;
import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
import org.apache.skywalking.apm.agent.core.context.trace.LogDataEntity;
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
Expand Down Expand Up @@ -107,21 +107,6 @@ public void testWithoutSerializedContextData() throws Throwable {
assertHttpSpan(spans.get(0));
}

@Test
public void testWithSerializedContextData() throws Throwable {
when(request.getHeader(SW6CarrierItem.HEADER_NAME)).thenReturn("1-I0FRQSojQVFBKkV0MFdlMHRRTlFBKg==-MS4yMzQuMTEx-3-1-1-IzE5Mi4xNjguMS44OjE4MDAy-Iy9wb3J0YWwv-Iy90ZXN0RW50cnlTcGFu");

interceptor.beforeMethod(enhancedInstance, null, arguments, argumentType, methodInterceptResult);
interceptor.afterMethod(enhancedInstance, null, arguments, argumentType, null);

assertThat(segmentStorage.getTraceSegments().size(), is(1));
TraceSegment traceSegment = segmentStorage.getTraceSegments().get(0);
List<AbstractTracingSpan> spans = SegmentHelper.getSpans(traceSegment);

assertHttpSpan(spans.get(0));
assertTraceSegmentRef(traceSegment.getRefs().get(0));
}

@Test
public void testWithOccurException() throws Throwable {
interceptor.beforeMethod(enhancedInstance, null, arguments, argumentType, methodInterceptResult);
Expand All @@ -140,7 +125,6 @@ public void testWithOccurException() throws Throwable {

private void assertTraceSegmentRef(TraceSegmentRef ref) {
MatcherAssert.assertThat(SegmentRefHelper.getSpanId(ref), is(3));
assertThat(SegmentRefHelper.getEntryServiceInstanceId(ref), is(1));
MatcherAssert.assertThat(SegmentRefHelper.getTraceSegmentId(ref).toString(), is("1.234.111"));
}

Expand Down
2 changes: 1 addition & 1 deletion resin-4.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>

<groupId>org.apache.skywalking</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import io.skywalking.apm.plugin.resin.v4.ResinV4Interceptor;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.skywalking.apm.agent.core.context.SW6CarrierItem;
import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
import org.apache.skywalking.apm.agent.core.context.trace.LogDataEntity;
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
Expand Down Expand Up @@ -108,20 +107,6 @@ public void testWithoutSerializedContextData() throws Throwable {
assertHttpSpan(spans.get(0));
}

@Test
public void testWithSerializedContextData() throws Throwable {
when(request.getHeader(SW6CarrierItem.HEADER_NAME)).thenReturn("1-I0FRQSojQVFBKkV0MFdlMHRRTlFBKg==-MS4yMzQuMTEx-3-1-1-IzE5Mi4xNjguMS44OjE4MDAy-Iy9wb3J0YWwv-Iy90ZXN0RW50cnlTcGFu");

interceptor.beforeMethod(enhancedInstance, null, arguments, argumentType, methodInterceptResult);
interceptor.afterMethod(enhancedInstance, null, arguments, argumentType, null);

assertThat(segmentStorage.getTraceSegments().size(), is(1));
TraceSegment traceSegment = segmentStorage.getTraceSegments().get(0);
List<AbstractTracingSpan> spans = SegmentHelper.getSpans(traceSegment);

assertHttpSpan(spans.get(0));
assertTraceSegmentRef(traceSegment.getRefs().get(0));
}

@Test
public void testWithOccurException() throws Throwable {
Expand All @@ -140,7 +125,6 @@ public void testWithOccurException() throws Throwable {
}

private void assertTraceSegmentRef(TraceSegmentRef ref) {
assertThat(SegmentRefHelper.getEntryServiceInstanceId(ref), is(1));
assertThat(SegmentRefHelper.getSpanId(ref), is(3));
assertThat(SegmentRefHelper.getTraceSegmentId(ref).toString(), is("1.234.111"));
}
Expand Down

0 comments on commit b4f81fe

Please sign in to comment.