This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 a3b03245f66 Rename E2ETestCases for Jaeger module (#32180)
a3b03245f66 is described below
commit a3b03245f666aeb3ce05ca897b03f4feb15f26f3
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Jul 18 20:19:00 2024 +0800
Rename E2ETestCases for Jaeger module (#32180)
---
.../test/e2e/agent/jaeger/JaegerPluginE2EIT.java | 4 +--
...IntegrationTestCases.java => E2ETestCases.java} | 6 ++--
...estCasesLoader.java => E2ETestCasesLoader.java} | 32 +++++++++++-----------
.../src/test/resources/cases/jdbc/execute_sql.xml | 4 +--
.../src/test/resources/cases/jdbc/parse_sql.xml | 4 +--
.../src/test/resources/cases/jdbc/root_invoke.xml | 4 +--
.../src/test/resources/cases/proxy/execute_sql.xml | 4 +--
.../src/test/resources/cases/proxy/parse_sql.xml | 4 +--
.../src/test/resources/cases/proxy/root_invoke.xml | 4 +--
9 files changed, 33 insertions(+), 33 deletions(-)
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
index 53ed6d8510e..394db850ac2 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.e2e.agent.jaeger;
import
org.apache.shardingsphere.test.e2e.agent.common.AgentTestActionExtension;
import org.apache.shardingsphere.test.e2e.agent.common.env.E2ETestEnvironment;
import org.apache.shardingsphere.test.e2e.agent.jaeger.asserts.SpanAssert;
-import
org.apache.shardingsphere.test.e2e.agent.jaeger.cases.IntegrationTestCasesLoader;
+import
org.apache.shardingsphere.test.e2e.agent.jaeger.cases.E2ETestCasesLoader;
import org.apache.shardingsphere.test.e2e.agent.jaeger.cases.SpanTestCase;
import org.junit.jupiter.api.condition.EnabledIf;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -50,7 +50,7 @@ class JaegerPluginE2EIT {
@Override
public Stream<? extends Arguments> provideArguments(final
ExtensionContext extensionContext) {
- return
IntegrationTestCasesLoader.getInstance().loadIntegrationTestCases(E2ETestEnvironment.getInstance().getAdapter()).stream().map(Arguments::of);
+ return
E2ETestCasesLoader.getInstance().loadTestCases(E2ETestEnvironment.getInstance().getAdapter()).stream().map(Arguments::of);
}
}
}
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/IntegrationTestCases.java
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCases.java
similarity index 90%
rename from
test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/IntegrationTestCases.java
rename to
test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCases.java
index 2d08981dace..191ad73ee97 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/IntegrationTestCases.java
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCases.java
@@ -25,11 +25,11 @@ import java.util.Collection;
import java.util.LinkedList;
/**
- * Integration test cases.
+ * E2E test cases.
*/
-@XmlRootElement(name = "integration-test-cases")
+@XmlRootElement(name = "e2e-test-cases")
@Getter
-public final class IntegrationTestCases {
+public final class E2ETestCases {
@XmlElement(name = "test-case")
private final Collection<SpanTestCase> testCases = new LinkedList<>();
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/IntegrationTestCasesLoader.java
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCasesLoader.java
similarity index 76%
rename from
test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/IntegrationTestCasesLoader.java
rename to
test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCasesLoader.java
index fe161163fcf..bc8f638c597 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/IntegrationTestCasesLoader.java
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCasesLoader.java
@@ -41,46 +41,46 @@ import java.util.Objects;
import java.util.stream.Collectors;
/**
- * Integration test cases loader.
+ * E2E test cases loader.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class IntegrationTestCasesLoader {
+public final class E2ETestCasesLoader {
private static final String FILE_EXTENSION = ".xml";
- private static final IntegrationTestCasesLoader INSTANCE = new
IntegrationTestCasesLoader();
+ private static final E2ETestCasesLoader INSTANCE = new
E2ETestCasesLoader();
- private Collection<SpanTestCase> integrationTestCases;
+ private Collection<SpanTestCase> testCases;
/**
* Get singleton instance.
*
* @return singleton instance
*/
- public static IntegrationTestCasesLoader getInstance() {
+ public static E2ETestCasesLoader getInstance() {
return INSTANCE;
}
/**
- * Load integration test cases.
+ * Load E2E test cases.
*
* @param adapter adapter
- * @return integration test cases
+ * @return test cases
*/
@SneakyThrows({IOException.class, URISyntaxException.class,
JAXBException.class})
- public Collection<SpanTestCase> loadIntegrationTestCases(final String
adapter) {
- if (null != integrationTestCases) {
- return integrationTestCases;
+ public Collection<SpanTestCase> loadTestCases(final String adapter) {
+ if (null != testCases) {
+ return testCases;
}
- integrationTestCases = new LinkedList<>();
+ testCases = new LinkedList<>();
URL url =
Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResource(String.format("cases/%s",
adapter)));
for (File each : getFiles(url)) {
- integrationTestCases.addAll(loadIntegrationTestCases(each));
+ testCases.addAll(loadTestCases(each));
}
- return integrationTestCases;
+ return testCases;
}
- private Collection<SpanTestCase> loadIntegrationTestCases(final File file)
throws IOException, JAXBException {
+ private Collection<SpanTestCase> loadTestCases(final File file) throws
IOException, JAXBException {
Collection<SpanTestCase> result = new LinkedList<>();
for (SpanTestCase each : unmarshal(file.getPath()).getTestCases()) {
result.addAll(each.getTagCases().stream().map(optional ->
createSpanTestCase(each.getServiceName(), each.getSpanName(),
optional)).collect(Collectors.toList()));
@@ -103,9 +103,9 @@ public final class IntegrationTestCasesLoader {
return result;
}
- private IntegrationTestCases unmarshal(final String integrateCasesFile)
throws IOException, JAXBException {
+ private E2ETestCases unmarshal(final String integrateCasesFile) throws
IOException, JAXBException {
try (FileReader reader = new FileReader(integrateCasesFile)) {
- return (IntegrationTestCases)
JAXBContext.newInstance(IntegrationTestCases.class).createUnmarshaller().unmarshal(reader);
+ return (E2ETestCases)
JAXBContext.newInstance(E2ETestCases.class).createUnmarshaller().unmarshal(reader);
}
}
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/execute_sql.xml
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/execute_sql.xml
index a1f52709c1a..dd66b8496a8 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/execute_sql.xml
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/execute_sql.xml
@@ -16,7 +16,7 @@
~ limitations under the License.
-->
-<integration-test-cases>
+<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"/>
@@ -28,4 +28,4 @@
<tag-assertion key="db.bind_vars" need-assert-value="false" />
<tag-assertion key="db.statement" need-assert-value="false" />
</test-case>
-</integration-test-cases>
+</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/parse_sql.xml
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/parse_sql.xml
index 3210d81d828..d25546ce4c4 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/parse_sql.xml
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/parse_sql.xml
@@ -16,10 +16,10 @@
~ limitations under the License.
-->
-<integration-test-cases>
+<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"/>
</test-case>
-</integration-test-cases>
+</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/root_invoke.xml
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/root_invoke.xml
index c7b739f079f..4296b427b3e 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/root_invoke.xml
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/jdbc/root_invoke.xml
@@ -16,9 +16,9 @@
~ limitations under the License.
-->
-<integration-test-cases>
+<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"/>
</test-case>
-</integration-test-cases>
+</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/execute_sql.xml
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/execute_sql.xml
index a1f52709c1a..dd66b8496a8 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/execute_sql.xml
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/execute_sql.xml
@@ -16,7 +16,7 @@
~ limitations under the License.
-->
-<integration-test-cases>
+<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"/>
@@ -28,4 +28,4 @@
<tag-assertion key="db.bind_vars" need-assert-value="false" />
<tag-assertion key="db.statement" need-assert-value="false" />
</test-case>
-</integration-test-cases>
+</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/parse_sql.xml
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/parse_sql.xml
index 3210d81d828..d25546ce4c4 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/parse_sql.xml
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/parse_sql.xml
@@ -16,10 +16,10 @@
~ limitations under the License.
-->
-<integration-test-cases>
+<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"/>
</test-case>
-</integration-test-cases>
+</e2e-test-cases>
diff --git
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/root_invoke.xml
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/root_invoke.xml
index c7b739f079f..4296b427b3e 100644
---
a/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/root_invoke.xml
+++
b/test/e2e/agent/plugins/tracing/jaeger/src/test/resources/cases/proxy/root_invoke.xml
@@ -16,9 +16,9 @@
~ limitations under the License.
-->
-<integration-test-cases>
+<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"/>
</test-case>
-</integration-test-cases>
+</e2e-test-cases>