1. 测试Apollo

This commit is contained in:
zhanghua
2022-12-05 01:18:24 +08:00
parent 7e2e0c337c
commit 3a85cc36a4
3 changed files with 26 additions and 5 deletions

View File

@@ -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>

View File

@@ -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);
}
}
}

View File

@@ -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