com.jupiter.tools.stress.test.concurrency.strategy.TestRunnerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stress-test Show documentation
Show all versions of stress-test Show documentation
JUnit5 Extensions Suite to make stress tests
The newest version!
package com.jupiter.tools.stress.test.concurrency.strategy;
import com.jupiter.tools.stress.test.concurrency.ExecutionMode;
import com.jupiter.tools.stress.test.concurrency.testrunner.TestRunner;
/**
* Created on 13.09.2018.
*
* Factory to provide a different type of TestRunner
* by the {@link ExecutionMode}
*
* @author Korovin Anatoliy
*/
public class TestRunnerFactory {
public TestRunner get(ExecutionMode mode){
switch (mode) {
case PARALLEL_STREAM_MODE:
return new ParallelStreamTestRunner();
case EXECUTOR_MODE:
return new ThreadPoolExecutorTestRunner();
default:
throw new RuntimeException("Not found TestRunner for ["+mode+"] execution mode");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy