diff --git a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCasesLoader.java b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCasesLoader.java index bc8f638c59775..9ebbdc40595e5 100644 --- a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCasesLoader.java +++ b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/E2ETestCasesLoader.java @@ -62,7 +62,7 @@ public static E2ETestCasesLoader getInstance() { } /** - * Load E2E test cases. + * Load test cases. * * @param adapter adapter * @return test cases @@ -103,8 +103,8 @@ public FileVisitResult visitFile(final Path file, final BasicFileAttributes basi return result; } - private E2ETestCases unmarshal(final String integrateCasesFile) throws IOException, JAXBException { - try (FileReader reader = new FileReader(integrateCasesFile)) { + private E2ETestCases unmarshal(final String e2eCasesFile) throws IOException, JAXBException { + try (FileReader reader = new FileReader(e2eCasesFile)) { return (E2ETestCases) JAXBContext.newInstance(E2ETestCases.class).createUnmarshaller().unmarshal(reader); } } diff --git a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/SpanTestCase.java b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/SpanTestCase.java index 7cf823c39cdea..8fcab62fa0ccf 100644 --- a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/SpanTestCase.java +++ b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/SpanTestCase.java @@ -30,9 +30,9 @@ /** * Span test case. */ +@XmlAccessorType(XmlAccessType.FIELD) @Getter @Setter -@XmlAccessorType(XmlAccessType.FIELD) public final class SpanTestCase { @XmlAttribute(name = "service-name") 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 8fd0815245d19..411b22d560d0c 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 @@ -50,7 +50,7 @@ private static class TestCaseArgumentsProvider implements ArgumentsProvider { @Override public Stream provideArguments(final ExtensionContext extensionContext) { - return E2ETestCasesLoader.getInstance().loadE2ETestCases(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/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/E2ETestCasesLoader.java b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/E2ETestCasesLoader.java index d822dcc85a9f3..ada9f9c8b315b 100644 --- a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/E2ETestCasesLoader.java +++ b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/E2ETestCasesLoader.java @@ -50,7 +50,7 @@ public final class E2ETestCasesLoader { private static final E2ETestCasesLoader INSTANCE = new E2ETestCasesLoader(); - private Collection e2eTestCases; + private Collection testCases; /** * Get singleton instance. @@ -62,25 +62,25 @@ public static E2ETestCasesLoader getInstance() { } /** - * Load E2E test cases. + * Load test cases. * * @param adapter adapter - * @return E2E test cases + * @return test cases */ @SneakyThrows({IOException.class, URISyntaxException.class, JAXBException.class}) - public Collection loadE2ETestCases(final String adapter) { - if (null != e2eTestCases) { - return e2eTestCases; + public Collection loadTestCases(final String adapter) { + if (null != testCases) { + return testCases; } - e2eTestCases = new LinkedList<>(); + testCases = new LinkedList<>(); URL url = Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResource(String.format("cases/%s", adapter))); for (File each : getFiles(url)) { - e2eTestCases.addAll(loadE2ETestCases(each)); + testCases.addAll(loadTestCases(each)); } - return e2eTestCases; + return testCases; } - private Collection loadE2ETestCases(final File file) throws IOException, JAXBException { + private Collection loadTestCases(final File file) throws IOException, JAXBException { Collection 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())); 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/SpanTestCase.java index c4f61b3450c49..8a429b09bcd3f 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/SpanTestCase.java @@ -30,9 +30,9 @@ /** * Span test case. */ +@XmlAccessorType(XmlAccessType.FIELD) @Getter @Setter -@XmlAccessorType(XmlAccessType.FIELD) public final class SpanTestCase { @XmlAttribute(name = "service-name")