This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 72c8745 add scenarios type in CaseParameterizedArray (#9537)
72c8745 is described below
commit 72c87452092e5072ab4d0e3c67320fd93ba478a6
Author: Jieker <[email protected]>
AuthorDate: Mon Mar 1 15:26:01 2021 +0800
add scenarios type in CaseParameterizedArray (#9537)
---
.../test/integration/engine/param/ParameterizedArrayFactory.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java
index 2715a12..dbbf787 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java
@@ -146,7 +146,9 @@ public final class ParameterizedArrayFactory {
private static Collection<ParameterizedArray>
getCaseParameterizedArray(final IntegrationTestCaseContext testCaseContext,
final String adapter,
final DatabaseType databaseType, final SQLCommandType sqlCommandType) {
- return ENV.getScenarios().stream().map(each -> new
CaseParameterizedArray(testCaseContext, adapter, each, databaseType,
sqlCommandType)).collect(Collectors.toList());
+ Collection<String> scenarios = null ==
testCaseContext.getTestCase().getScenarioTypes() ? Collections.emptyList() :
Arrays.asList(testCaseContext.getTestCase().getScenarioTypes().split(","));
+ return ENV.getScenarios().stream().filter(each -> scenarios.isEmpty()
|| scenarios.contains(each))
+ .map(each -> new CaseParameterizedArray(testCaseContext,
adapter, each, databaseType, sqlCommandType)).collect(Collectors.toList());
}
private static Collection<DatabaseType> getDatabaseTypes(final String
databaseTypes) {