This is an automated email from the ASF dual-hosted git repository.
panjuan 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 eea5f0b8d92 Refactor PipelineWatcher to ease troubleshooting (#24114)
eea5f0b8d92 is described below
commit eea5f0b8d9285564601b250bec0f139ec0fd4560
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Sat Feb 11 19:48:40 2023 +0800
Refactor PipelineWatcher to ease troubleshooting (#24114)
---
.../pipeline/framework/watcher/PipelineWatcher.java | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/PipelineWatcher.java
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/PipelineWatcher.java
index 156aaf59385..fb7cff65d87 100644
---
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/PipelineWatcher.java
+++
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/PipelineWatcher.java
@@ -25,7 +25,6 @@ import
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositor
import
org.apache.shardingsphere.mode.repository.cluster.zookeeper.ZookeeperRepository;
import
org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.compose.BaseContainerComposer;
import
org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.compose.DockerContainerComposer;
-import
org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.compose.NativeContainerComposer;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
@@ -40,13 +39,6 @@ public class PipelineWatcher extends TestWatcher {
private final BaseContainerComposer containerComposer;
- @Override
- protected void failed(final Throwable e, final Description description) {
- if (containerComposer instanceof NativeContainerComposer) {
- super.failed(e, description);
- }
- }
-
// TODO now the meta data mistake is not reproduce, but keep this method,
it may be used again
private void outputZookeeperData() {
if (!(containerComposer instanceof DockerContainerComposer)) {
@@ -82,13 +74,22 @@ public class PipelineWatcher extends TestWatcher {
@Override
protected void starting(final Description description) {
- log.info("starting: {}", description);
+ log.info("pipeline E2E starting: {}", description);
containerComposer.start();
}
+ @Override
+ protected void succeeded(final Description description) {
+ log.info("pipeline E2E succeeded: {}", description);
+ }
+
+ @Override
+ protected void failed(final Throwable ex, final Description description) {
+ log.info("pipeline E2E failed: {}", description, ex);
+ }
+
@Override
protected void finished(final Description description) {
- log.info("finished: {}", description);
containerComposer.close();
}
}