tianhao960 commented on code in PR #20910: URL: https://github.com/apache/shardingsphere/pull/20910#discussion_r967831501
########## shardingsphere-test/shardingsphere-test-common/src/main/java/org/apache/shardingsphere/test/runner/parallel/impl/DefaultParallelRunnerExecutor.java: ########## @@ -0,0 +1,67 @@ +/* + * 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.runner.parallel.impl; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import lombok.Getter; +import org.apache.shardingsphere.test.runner.parallel.ParallelRunnerExecutor; +import java.util.Collection; +import java.util.LinkedList; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +/** + * default parallel executor. + * @param <T> key type bind to parallel executor + */ +public class DefaultParallelRunnerExecutor<T> implements ParallelRunnerExecutor<T> { Review Comment: DefaultParallelRunnerExecutorFactory need create instance of DefaultParallelRunnerExecutorFactory and have added an implement of method `@Override public void execute(final T key, final Runnable childStatement) { taskFeatures.add(getExecutorService(key).submit(childStatement)); }` the reason why not make DefaultParallelRunnerExecutorFactory and DefaultParallelRunnerExecutor as an abstract class is that users can just depend on test-common package , and don't depend on test-suite package -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
