This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new c6ab1c1b4bb Refactor ZipkinPluginE2EIT (#32206)
c6ab1c1b4bb is described below
commit c6ab1c1b4bb352c22fe656c185c92649ce9cdfce
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Jul 20 21:16:45 2024 +0800
Refactor ZipkinPluginE2EIT (#32206)
---
.../e2e/agent/jaeger/asserts/JaegerSpanAssert.java | 10 +--
.../test/e2e/agent/zipkin/ZipkinPluginE2EIT.java | 8 +-
.../test/e2e/agent/zipkin/asserts/SpanAssert.java | 86 ----------------------
.../e2e/agent/zipkin/asserts/ZipkinSpanAssert.java | 82 +++++++++++++++++++++
.../response/ZipkinLocalEndpoint.java} | 7 +-
.../response/ZipkinSpanResponse.java} | 9 ++-
.../{SpanTestCase.java => ZipkinE2ETestCase.java} | 10 +--
.../e2e/agent/zipkin/cases/ZipkinE2ETestCases.java | 4 +-
.../{TagAssertion.java => ZipkinTagAssertion.java} | 6 +-
.../src/test/resources/cases/jdbc/execute_sql.xml | 18 ++---
.../src/test/resources/cases/jdbc/parse_sql.xml | 6 +-
.../src/test/resources/cases/jdbc/root_invoke.xml | 4 +-
.../src/test/resources/cases/proxy/execute_sql.xml | 18 ++---
.../src/test/resources/cases/proxy/parse_sql.xml | 6 +-
.../src/test/resources/cases/proxy/root_invoke.xml | 4 +-
15 files changed, 138 insertions(+), 140 deletions(-)
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/asserts/JaegerSpanAssert.java
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/asserts/JaegerSpanAssert.java
index a87d04a81b1..6292ba56514 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/asserts/JaegerSpanAssert.java
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/asserts/JaegerSpanAssert.java
@@ -56,13 +56,13 @@ public final class JaegerSpanAssert {
private static void assertTagKey(final String jaegerUrl, final
JaegerE2ETestCase expected) {
String queryURL =
String.format("%s/api/traces?service=%s&operation=%s&limit=%s", jaegerUrl,
encode(expected.getServiceName()), encode(expected.getSpanName()), 1000);
- Optional<JaegerSpanResponse> spanResponse =
queryTraceResponses(queryURL).stream().flatMap(each -> each.getSpans().stream())
+ Optional<JaegerSpanResponse> spanResponses =
queryTraceResponses(queryURL).stream().flatMap(each -> each.getSpans().stream())
.filter(each ->
expected.getSpanName().equalsIgnoreCase(each.getOperationName())).findFirst();
- assertTrue(spanResponse.isPresent());
- Collection<String> actualTags =
spanResponse.get().getTags().stream().map(Tag::getKey).collect(Collectors.toSet());
+ assertTrue(spanResponses.isPresent());
+ Collection<String> actualTags =
spanResponses.get().getTags().stream().map(Tag::getKey).collect(Collectors.toSet());
Collection<String> expectedTags =
expected.getTags().stream().map(JaegerTagAssertion::getTagKey).collect(Collectors.toSet());
- Collection<String> nonExistentTags = expectedTags.stream().filter(each
-> !actualTags.contains(each)).collect(Collectors.toSet());
- assertTrue(nonExistentTags.isEmpty(), String.format("The tags `%s`
does not exist in `%s` span", nonExistentTags, expected.getSpanName()));
+ Collection<String> notExistedTags = expectedTags.stream().filter(each
-> !actualTags.contains(each)).collect(Collectors.toSet());
+ assertTrue(notExistedTags.isEmpty(), String.format("The tags `%s` does
not exist in `%s` span", notExistedTags, expected.getSpanName()));
}
private static void assertTagValue(final String jaegerUrl, final
JaegerE2ETestCase expected, final JaegerTagAssertion expectedTagCase) {
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
index 6ba2572a15a..1426c69cbf9 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
@@ -20,8 +20,8 @@ package org.apache.shardingsphere.test.e2e.agent.zipkin;
import
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
import
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestActionExtension;
import
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestCaseArgumentsProvider;
-import org.apache.shardingsphere.test.e2e.agent.zipkin.asserts.SpanAssert;
-import org.apache.shardingsphere.test.e2e.agent.zipkin.cases.SpanTestCase;
+import
org.apache.shardingsphere.test.e2e.agent.zipkin.asserts.ZipkinSpanAssert;
+import org.apache.shardingsphere.test.e2e.agent.zipkin.cases.ZipkinE2ETestCase;
import
org.apache.shardingsphere.test.e2e.agent.zipkin.cases.ZipkinE2ETestCases;
import org.junit.jupiter.api.condition.EnabledIf;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -34,8 +34,8 @@ class ZipkinPluginE2EIT {
@EnabledIf("isEnabled")
@ParameterizedTest
@ArgumentsSource(TestCaseArgumentsProvider.class)
- void assertTraceAgent(final SpanTestCase testCase) {
-
SpanAssert.assertIs(AgentE2ETestEnvironment.getInstance().getZipKinHttpUrl(),
testCase);
+ void assertTraceAgent(final ZipkinE2ETestCase testCase) {
+
ZipkinSpanAssert.assertIs(AgentE2ETestEnvironment.getInstance().getZipKinHttpUrl(),
testCase);
}
private static boolean isEnabled() {
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/SpanAssert.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/SpanAssert.java
deleted file mode 100644
index c146129b709..00000000000
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/SpanAssert.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.test.e2e.agent.zipkin.asserts;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import lombok.SneakyThrows;
-import org.apache.shardingsphere.infra.util.json.JsonUtils;
-import org.apache.shardingsphere.test.e2e.agent.common.util.HttpUtils;
-import org.apache.shardingsphere.test.e2e.agent.zipkin.cases.SpanTestCase;
-import org.apache.shardingsphere.test.e2e.agent.zipkin.cases.TagAssertion;
-import org.apache.shardingsphere.test.e2e.agent.zipkin.result.SpanResult;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * Span assert.
- */
-public final class SpanAssert {
-
- /**
- * Assert span is correct with expected result.
- *
- * @param baseUrl zipkin url
- * @param expected expected span
- */
- public static void assertIs(final String baseUrl, final SpanTestCase
expected) {
- assertTagKey(baseUrl, expected);
-
expected.getTagCases().stream().filter(TagAssertion::isNeedAssertValue).forEach(each
-> assertTagValue(baseUrl, expected, each));
- }
-
- private static void assertTagKey(final String baseUrl, final SpanTestCase
expected) {
- String baseTraceApiUrl =
String.format("%s/api/v2/traces?serviceName=%s&spanName=%s&limit=%s", baseUrl,
getEncodeValue(expected.getServiceName()),
- getEncodeValue(expected.getSpanName()), 1000);
- Collection<SpanResult> spanResults = getSpanResults(expected,
baseTraceApiUrl);
- Collection<String> actualTags = spanResults.stream().flatMap(each ->
each.getTags().keySet().stream()).collect(Collectors.toSet());
- Collection<String> expectedTags =
expected.getTagCases().stream().map(TagAssertion::getTagKey).collect(Collectors.toSet());
- Collection<String> nonExistentTags = expectedTags.stream().filter(each
-> !actualTags.contains(each)).collect(Collectors.toSet());
- assertTrue(nonExistentTags.isEmpty(), String.format("The tags `%s`
does not exist in `%s` span", nonExistentTags, expected.getSpanName()));
- }
-
- private static void assertTagValue(final String baseUrl, final
SpanTestCase expected, final TagAssertion expectedTagCase) {
- String baseTraceApiUrl =
String.format("%s/api/v2/traces?serviceName=%s&spanName=%s&annotationQuery=%s&limit=%s",
baseUrl, getEncodeValue(expected.getServiceName()),
- getEncodeValue(expected.getSpanName()),
getEncodeValue(String.format("%s=%s", expectedTagCase.getTagKey(),
expectedTagCase.getTagValue())), 1000);
- Collection<SpanResult> spanResults = getSpanResults(expected,
baseTraceApiUrl);
- assertFalse(spanResults.isEmpty(), String.format("The tag `%s`=`%s`
does not exist in `%s` span", expectedTagCase.getTagKey(),
expectedTagCase.getTagValue(), expected.getSpanName()));
- }
-
- @SneakyThrows(UnsupportedEncodingException.class)
- private static String getEncodeValue(final String value) {
- return URLEncoder.encode(value, "UTF-8");
- }
-
- @SneakyThrows(IOException.class)
- private static Collection<SpanResult> getSpanResults(final SpanTestCase
expected, final String url) {
- List<List<SpanResult>> result =
JsonUtils.fromJsonString(HttpUtils.getInstance().query(url), new
TypeReference<List<List<SpanResult>>>() {
- });
- assertNotNull(result);
- return
result.stream().findFirst().orElse(Collections.emptyList()).stream()
- .filter(each ->
expected.getSpanName().equalsIgnoreCase(each.getName())).collect(Collectors.toList());
- }
-}
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/ZipkinSpanAssert.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/ZipkinSpanAssert.java
new file mode 100644
index 00000000000..f869e099407
--- /dev/null
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/ZipkinSpanAssert.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.e2e.agent.zipkin.asserts;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import lombok.SneakyThrows;
+import org.apache.shardingsphere.infra.util.json.JsonUtils;
+import org.apache.shardingsphere.test.e2e.agent.common.util.HttpUtils;
+import
org.apache.shardingsphere.test.e2e.agent.zipkin.asserts.response.ZipkinSpanResponse;
+import org.apache.shardingsphere.test.e2e.agent.zipkin.cases.ZipkinE2ETestCase;
+import
org.apache.shardingsphere.test.e2e.agent.zipkin.cases.ZipkinTagAssertion;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * Zipkin span assert.
+ */
+public final class ZipkinSpanAssert {
+
+ /**
+ * Assert zipkin span.
+ *
+ * @param zipkinUrl zipkin query URL
+ * @param expected expected test case
+ */
+ public static void assertIs(final String zipkinUrl, final
ZipkinE2ETestCase expected) {
+ assertTagKey(zipkinUrl, expected);
+
expected.getTags().stream().filter(ZipkinTagAssertion::isNeedAssertValue).forEach(each
-> assertTagValue(zipkinUrl, expected, each));
+ }
+
+ private static void assertTagKey(final String zipkinUrl, final
ZipkinE2ETestCase expected) {
+ String baseTraceApiUrl =
String.format("%s/api/v2/traces?serviceName=%s&spanName=%s&limit=%s",
zipkinUrl, encode(expected.getServiceName()), encode(expected.getSpanName()),
1000);
+ Collection<ZipkinSpanResponse> spanResponses =
queryTraceResponses(expected, baseTraceApiUrl);
+ Collection<String> actualTags = spanResponses.stream().flatMap(each ->
each.getTags().keySet().stream()).collect(Collectors.toSet());
+ Collection<String> expectedTags =
expected.getTags().stream().map(ZipkinTagAssertion::getTagKey).collect(Collectors.toSet());
+ Collection<String> notExistedTags = expectedTags.stream().filter(each
-> !actualTags.contains(each)).collect(Collectors.toSet());
+ assertTrue(notExistedTags.isEmpty(), String.format("The tags `%s` does
not exist in `%s` span", notExistedTags, expected.getSpanName()));
+ }
+
+ private static void assertTagValue(final String zipkinUrl, final
ZipkinE2ETestCase expected, final ZipkinTagAssertion expectedTagCase) {
+ String queryURL =
String.format("%s/api/v2/traces?serviceName=%s&spanName=%s&annotationQuery=%s&limit=%s",
zipkinUrl, encode(expected.getServiceName()),
+ encode(expected.getSpanName()), encode(String.format("%s=%s",
expectedTagCase.getTagKey(), expectedTagCase.getTagValue())), 1000);
+ assertFalse(queryTraceResponses(expected, queryURL).isEmpty(),
+ String.format("The tag `%s`=`%s` does not exist in `%s` span",
expectedTagCase.getTagKey(), expectedTagCase.getTagValue(),
expected.getSpanName()));
+ }
+
+ @SneakyThrows(UnsupportedEncodingException.class)
+ private static String encode(final String value) {
+ return URLEncoder.encode(value, "UTF-8");
+ }
+
+ @SneakyThrows(IOException.class)
+ private static Collection<ZipkinSpanResponse> queryTraceResponses(final
ZipkinE2ETestCase expected, final String url) {
+ List<List<ZipkinSpanResponse>> result =
JsonUtils.fromJsonString(HttpUtils.getInstance().query(url), new
TypeReference<List<List<ZipkinSpanResponse>>>() {
+ });
+ return
result.stream().findFirst().orElse(Collections.emptyList()).stream().filter(each
->
expected.getSpanName().equalsIgnoreCase(each.getName())).collect(Collectors.toList());
+ }
+}
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/result/LocalEndpoint.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/response/ZipkinLocalEndpoint.java
similarity index 79%
rename from
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/result/LocalEndpoint.java
rename to
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/response/ZipkinLocalEndpoint.java
index 95f9bd2e550..28d494aa009 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/result/LocalEndpoint.java
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/response/ZipkinLocalEndpoint.java
@@ -15,17 +15,18 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.e2e.agent.zipkin.result;
+package org.apache.shardingsphere.test.e2e.agent.zipkin.asserts.response;
import lombok.Getter;
import lombok.Setter;
+import org.apache.shardingsphere.infra.util.json.JsonConfiguration;
/**
- * Local endpoint.
+ * Zipkin local endpoint.
*/
@Getter
@Setter
-public final class LocalEndpoint {
+public final class ZipkinLocalEndpoint implements JsonConfiguration {
private String serviceName;
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/result/SpanResult.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/response/ZipkinSpanResponse.java
similarity index 79%
rename from
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/result/SpanResult.java
rename to
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/response/ZipkinSpanResponse.java
index 7f477fc90f8..2601172f43a 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/result/SpanResult.java
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/asserts/response/ZipkinSpanResponse.java
@@ -15,19 +15,20 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.e2e.agent.zipkin.result;
+package org.apache.shardingsphere.test.e2e.agent.zipkin.asserts.response;
import lombok.Getter;
import lombok.Setter;
+import org.apache.shardingsphere.infra.util.json.JsonConfiguration;
import java.util.Map;
/**
- * Span result.
+ * Zipkin span response.
*/
@Getter
@Setter
-public class SpanResult {
+public final class ZipkinSpanResponse implements JsonConfiguration {
private String traceId;
@@ -39,7 +40,7 @@ public class SpanResult {
private long duration;
- private LocalEndpoint localEndpoint;
+ private ZipkinLocalEndpoint localEndpoint;
private Map<String, String> tags;
}
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/SpanTestCase.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCase.java
similarity index 86%
rename from
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/SpanTestCase.java
rename to
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCase.java
index 904cb12869a..eba3d6de532 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/SpanTestCase.java
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCase.java
@@ -29,12 +29,12 @@ import javax.xml.bind.annotation.XmlElement;
import java.util.Collection;
/**
- * Span test case.
+ * Zipkin E2E test case.
*/
@XmlAccessorType(XmlAccessType.FIELD)
@Getter
@Setter
-public final class SpanTestCase implements AgentE2ETestCase {
+public final class ZipkinE2ETestCase implements AgentE2ETestCase {
@XmlAttribute(name = "service-name")
private String serviceName;
@@ -42,11 +42,11 @@ public final class SpanTestCase implements AgentE2ETestCase
{
@XmlAttribute(name = "span-name")
private String spanName;
- @XmlElement(name = "tag-assertion")
- private Collection<TagAssertion> tagCases;
+ @XmlElement(name = "tag")
+ private Collection<ZipkinTagAssertion> tags;
@Override
public String toString() {
- return String.format("%s -> %s -> %s",
AgentE2ETestEnvironment.getInstance().getAdapter(), spanName,
tagCases.iterator().next().toString());
+ return String.format("%s -> %s -> %s",
AgentE2ETestEnvironment.getInstance().getAdapter(), spanName,
tags.iterator().next().toString());
}
}
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCases.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCases.java
index 562f3eb9e8d..e78de7a9953 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCases.java
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCases.java
@@ -30,8 +30,8 @@ import java.util.LinkedList;
*/
@XmlRootElement(name = "e2e-test-cases")
@Getter
-public final class ZipkinE2ETestCases implements
AgentE2ETestCases<SpanTestCase> {
+public final class ZipkinE2ETestCases implements
AgentE2ETestCases<ZipkinE2ETestCase> {
@XmlElement(name = "test-case")
- private final Collection<SpanTestCase> testCases = new LinkedList<>();
+ private final Collection<ZipkinE2ETestCase> testCases = new LinkedList<>();
}
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/TagAssertion.java
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinTagAssertion.java
similarity index 95%
rename from
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/TagAssertion.java
rename to
test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinTagAssertion.java
index 95cf687c952..93258c436f3 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/TagAssertion.java
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinTagAssertion.java
@@ -25,12 +25,12 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
/**
- * Tag assertion.
+ * Zipkin tag assertion.
*/
+@XmlAccessorType(XmlAccessType.FIELD)
@Getter
@Setter
-@XmlAccessorType(XmlAccessType.FIELD)
-public final class TagAssertion {
+public final class ZipkinTagAssertion {
@XmlAttribute(name = "key")
private String tagKey;
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/execute_sql.xml
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/execute_sql.xml
index 3f4eba6be4f..3b4e29aea87 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/execute_sql.xml
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/execute_sql.xml
@@ -18,14 +18,14 @@
<e2e-test-cases>
<test-case service-name="shardingsphere"
span-name="/ShardingSphere/executeSQL/">
- <tag-assertion key="component" value="ShardingSphere"/>
- <tag-assertion key="span.kind" value="client"/>
- <tag-assertion key="db.type" value="MySQL"/>
- <tag-assertion key="peer.hostname" value="mysql.host"/>
- <tag-assertion key="peer.port" value="3306"/>
- <tag-assertion key="db.instance" value="ds_0"/>
- <tag-assertion key="db.instance" value="ds_1"/>
- <tag-assertion key="db.bind_vars" need-assert-value="false"/>
- <tag-assertion key="db.statement" need-assert-value="false"/>
+ <tag key="component" value="ShardingSphere" />
+ <tag key="span.kind" value="client" />
+ <tag key="db.type" value="MySQL" />
+ <tag key="peer.hostname" value="mysql.host" />
+ <tag key="peer.port" value="3306" />
+ <tag key="db.instance" value="ds_0" />
+ <tag key="db.instance" value="ds_1" />
+ <tag key="db.bind_vars" need-assert-value="false" />
+ <tag key="db.statement" need-assert-value="false" />
</test-case>
</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/parse_sql.xml
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/parse_sql.xml
index d25546ce4c4..1c19720aca0 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/parse_sql.xml
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/parse_sql.xml
@@ -18,8 +18,8 @@
<e2e-test-cases>
<test-case service-name="shardingsphere"
span-name="/ShardingSphere/parseSQL/">
- <tag-assertion key="component" value="ShardingSphere"/>
- <tag-assertion key="span.kind" value="internal"/>
- <tag-assertion key="db.statement" value="SELECT * FROM t_order"/>
+ <tag key="component" value="ShardingSphere" />
+ <tag key="span.kind" value="internal" />
+ <tag key="db.statement" value="SELECT * FROM t_order" />
</test-case>
</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/root_invoke.xml
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/root_invoke.xml
index 4296b427b3e..2d5345dd1e7 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/root_invoke.xml
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/jdbc/root_invoke.xml
@@ -18,7 +18,7 @@
<e2e-test-cases>
<test-case service-name="shardingsphere"
span-name="/ShardingSphere/rootInvoke/">
- <tag-assertion key="component" value="ShardingSphere"/>
- <tag-assertion key="span.kind" value="client"/>
+ <tag key="component" value="ShardingSphere" />
+ <tag key="span.kind" value="client" />
</test-case>
</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/execute_sql.xml
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/execute_sql.xml
index b65eecd7cd5..3b4e29aea87 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/execute_sql.xml
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/execute_sql.xml
@@ -18,14 +18,14 @@
<e2e-test-cases>
<test-case service-name="shardingsphere"
span-name="/ShardingSphere/executeSQL/">
- <tag-assertion key="component" value="ShardingSphere"/>
- <tag-assertion key="span.kind" value="client"/>
- <tag-assertion key="db.type" value="MySQL"/>
- <tag-assertion key="peer.hostname" value="mysql.host"/>
- <tag-assertion key="peer.port" value="3306"/>
- <tag-assertion key="db.instance" value="ds_0"/>
- <tag-assertion key="db.instance" value="ds_1"/>
- <tag-assertion key="db.bind_vars" need-assert-value="false"/>
- <tag-assertion key="db.statement" need-assert-value="false"/>
+ <tag key="component" value="ShardingSphere" />
+ <tag key="span.kind" value="client" />
+ <tag key="db.type" value="MySQL" />
+ <tag key="peer.hostname" value="mysql.host" />
+ <tag key="peer.port" value="3306" />
+ <tag key="db.instance" value="ds_0" />
+ <tag key="db.instance" value="ds_1" />
+ <tag key="db.bind_vars" need-assert-value="false" />
+ <tag key="db.statement" need-assert-value="false" />
</test-case>
</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/parse_sql.xml
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/parse_sql.xml
index d25546ce4c4..1c19720aca0 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/parse_sql.xml
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/parse_sql.xml
@@ -18,8 +18,8 @@
<e2e-test-cases>
<test-case service-name="shardingsphere"
span-name="/ShardingSphere/parseSQL/">
- <tag-assertion key="component" value="ShardingSphere"/>
- <tag-assertion key="span.kind" value="internal"/>
- <tag-assertion key="db.statement" value="SELECT * FROM t_order"/>
+ <tag key="component" value="ShardingSphere" />
+ <tag key="span.kind" value="internal" />
+ <tag key="db.statement" value="SELECT * FROM t_order" />
</test-case>
</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/root_invoke.xml
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/root_invoke.xml
index 4296b427b3e..2d5345dd1e7 100644
---
a/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/root_invoke.xml
+++
b/test/e2e/agent/plugins/tracing/zipkin/src/test/resources/cases/proxy/root_invoke.xml
@@ -18,7 +18,7 @@
<e2e-test-cases>
<test-case service-name="shardingsphere"
span-name="/ShardingSphere/rootInvoke/">
- <tag-assertion key="component" value="ShardingSphere"/>
- <tag-assertion key="span.kind" value="client"/>
+ <tag key="component" value="ShardingSphere" />
+ <tag key="span.kind" value="client" />
</test-case>
</e2e-test-cases>