You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by az...@apache.org on 2023/06/27 06:46:45 UTC
[shardingsphere] branch master updated: Improve pipeline E2E (#26613)
This is an automated email from the ASF dual-hosted git repository.
azexin 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 77cb46c4693 Improve pipeline E2E (#26613)
77cb46c4693 is described below
commit 77cb46c4693e692b390dba717f9b7f6b765b8754
Author: Hongsheng Zhong <zh...@apache.org>
AuthorDate: Tue Jun 27 14:46:37 2023 +0800
Improve pipeline E2E (#26613)
* Add more paths to trigger pipeline E2E
* Add pipeline E2E watcher
---
.github/workflows/e2e-pipeline.yml | 6 +++
.../pipeline/framework/PipelineE2EExtension.java | 44 ++++++++++++++++++++++
.../framework/param/PipelineE2ESettings.java | 4 ++
3 files changed, 54 insertions(+)
diff --git a/.github/workflows/e2e-pipeline.yml b/.github/workflows/e2e-pipeline.yml
index 38b0f078ac0..1559f85dbaa 100644
--- a/.github/workflows/e2e-pipeline.yml
+++ b/.github/workflows/e2e-pipeline.yml
@@ -24,6 +24,9 @@ on:
- '.github/workflows/e2e-pipeline.yml'
- 'infra/**/src/main/**'
- 'mode/**/src/main/**'
+ - 'features/encrypt/src/main/**'
+ - 'features/features/readwrite-splitting/src/main/**'
+ - 'features/sharding/src/main/**'
- 'proxy/**/src/main/**'
- 'jdbc/core/src/main/**'
- '**/*-distsql*/**/src/main/**'
@@ -43,6 +46,9 @@ on:
- '.github/workflows/e2e-pipeline.yml'
- 'infra/**/src/main/**'
- 'mode/**/src/main/**'
+ - 'features/encrypt/src/main/**'
+ - 'features/features/readwrite-splitting/src/main/**'
+ - 'features/sharding/src/main/**'
- 'proxy/**/src/main/**'
- 'jdbc/core/src/main/**'
- '**/*-distsql*/**/src/main/**'
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/PipelineE2EExtension.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/PipelineE2EExtension.java
new file mode 100644
index 00000000000..e1c8e800706
--- /dev/null
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/PipelineE2EExtension.java
@@ -0,0 +1,44 @@
+/*
+ * 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.data.pipeline.framework;
+
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.TestWatcher;
+
+import java.lang.reflect.Method;
+
+/**
+ * Pipeline E2E extension.
+ */
+@Slf4j
+public final class PipelineE2EExtension implements BeforeEachCallback, TestWatcher {
+
+ @Override
+ public void beforeEach(final ExtensionContext context) throws Exception {
+ log.info("Before case: {}.{}({})", context.getTestClass().map(Class::getSimpleName).orElse(""),
+ context.getTestMethod().map(Method::getName).orElse(""), context.getDisplayName());
+ }
+
+ @Override
+ public void testFailed(final ExtensionContext context, final Throwable cause) {
+ log.error("Error case: {}.{}({})", context.getTestClass().map(Class::getSimpleName).orElse(""),
+ context.getTestMethod().map(Method::getName).orElse(""), context.getDisplayName(), cause);
+ }
+}
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/PipelineE2ESettings.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/PipelineE2ESettings.java
index 62f7ca25a98..b9f991eecb0 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/PipelineE2ESettings.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/PipelineE2ESettings.java
@@ -17,6 +17,9 @@
package org.apache.shardingsphere.test.e2e.data.pipeline.framework.param;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.PipelineE2EExtension;
+import org.junit.jupiter.api.extension.ExtendWith;
+
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -24,6 +27,7 @@ import java.lang.annotation.RetentionPolicy;
/**
* Pipeline E2E settings.
*/
+@ExtendWith(PipelineE2EExtension.class)
@Inherited
@Retention(RetentionPolicy.RUNTIME)
public @interface PipelineE2ESettings {