zhanghua пре 2 година
родитељ
комит
3a85cc36a4

+ 15 - 2
liteflow-testcase-el/liteflow-testcase-el-apollo-springboot/pom.xml

@@ -3,9 +3,10 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>liteflow</artifactId>
+        <artifactId>liteflow-testcase-el</artifactId>
         <groupId>com.yomahub</groupId>
-        <version>2.9.4</version>
+        <version>${revision}</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -34,5 +35,17 @@
             <version>${revision}</version>
             <scope>test</scope>
         </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-core</artifactId>
+            <version>${hutool-core.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.yomahub</groupId>
+            <artifactId>liteflow-script-groovy</artifactId>
+            <version>${revision}</version>
+        </dependency>
     </dependencies>
 </project>

+ 10 - 2
liteflow-testcase-el/liteflow-testcase-el-apollo-springboot/src/test/java/com/yomahub/liteflow/test/apollo/ApolloWithXmlELSpringbootTest.java

@@ -40,9 +40,17 @@ public class ApolloWithXmlELSpringbootTest {
 	@Test
 	public void testApolloWithXml1() throws InterruptedException {
 		LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
-		Thread.sleep(2000l);
-		Assert.assertEquals("a==>b==>c==>c==>b==>a", response.getExecuteStepStrWithoutTime());
+		Assert.assertEquals("a==>b==>c==>s1[脚本s1]", response.getExecuteStepStrWithoutTime());
 	}
 
 
+	@Test
+	public void testApolloWithXml2() throws InterruptedException {
+		while (true) {
+			LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
+			System.out.println("liteflow step : " + response.getExecuteStepStrWithoutTime());
+			Thread.sleep(2000l);
+		}
+	}
+
 }

+ 1 - 1
liteflow-testcase-el/liteflow-testcase-el-apollo-springboot/src/test/resources/apollo/application-xml.properties

@@ -1,2 +1,2 @@
-liteflow.rule-source-ext-data={"namespace":"liteflowConfig"}
+liteflow.rule-source-ext-data={"chainNamespace":"chainConfig","scriptNamespace":"scriptConfig"}
 liteflow.parse-on-start=false