diff --git a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh index 754f2337c62..f83650f0f9d 100755 --- a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh +++ b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh @@ -110,4 +110,15 @@ do fi done -java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args} +UPD_ARGS="" +for arg in "$@"; do + if [[ $arg == *" "* ]]; then + key="${arg%%=*}" + value="${arg#*=}" + UPD_ARGS="${UPD_ARGS}${key}='${value}' " + else + UPD_ARGS="${UPD_ARGS}${arg} " + fi +done + +eval "java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${UPD_ARGS}" diff --git a/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/UserVariableIT.java b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/UserVariableIT.java index 0b92a89961e..518f83a2f0a 100644 --- a/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/UserVariableIT.java +++ b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/UserVariableIT.java @@ -18,8 +18,10 @@ package org.apache.seatunnel.engine.e2e; import org.apache.seatunnel.e2e.common.TestSuiteBase; +import org.apache.seatunnel.e2e.common.container.EngineType; import org.apache.seatunnel.e2e.common.container.TestContainer; +import org.apache.seatunnel.e2e.common.junit.DisabledOnContainer; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.TestTemplate; import org.testcontainers.containers.Container; @@ -31,9 +33,13 @@ public class UserVariableIT extends TestSuiteBase { @TestTemplate - public void userVariableTest(TestContainer container) throws IOException, InterruptedException { + @DisabledOnContainer( + value = {}, + type = {EngineType.FLINK, EngineType.SPARK}, + disabledReason = "") + public void zetaVariableTest(TestContainer container) throws IOException, InterruptedException { List variables = new ArrayList<>(); - String list = "[abc,def]"; + String list = "[a bc]"; variables.add("resName=a$(date +\"%Y%m%d\")"); variables.add("rowNum=10"); variables.add("strTemplate=" + list); diff --git a/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/fake_to_console.variables.conf b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/fake_to_console.variables.conf index 3c16b45b1bd..345864ef725 100644 --- a/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/fake_to_console.variables.conf +++ b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/fake_to_console.variables.conf @@ -57,6 +57,23 @@ sink { source_table_name = ${sourceTableName} } - # If you would like to get more information about how to configure seatunnel and see full list of sink plugins, - # please go to https://seatunnel.apache.org/docs/connector-v2/sink + Assert { + source_table_name = ${sourceTableName} + rules = + { + field_rules = [ + { + field_name = name + field_type = string + field_value = [ + { + rule_type = NOT_NULL + equals_to = "a bc" + } + ] + } + ] + } + } + }