Browse Source

修复一些测试用例

everywhere.z 2 years ago
parent
commit
77d130716e

+ 3 - 2
liteflow-testcase-el/liteflow-testcase-el-declare-multi-springboot/src/test/java/com/yomahub/liteflow/test/monitorFile/MonitorFileELDeclMultiSpringbootTest.java

@@ -5,6 +5,7 @@ import cn.hutool.core.io.resource.ClassPathResource;
 import cn.hutool.core.util.CharsetUtil;
 import com.yomahub.liteflow.core.FlowExecutor;
 import com.yomahub.liteflow.flow.LiteflowResponse;
+import com.yomahub.liteflow.test.BaseTest;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -22,7 +23,7 @@ import java.io.File;
 @SpringBootTest(classes = MonitorFileELDeclMultiSpringbootTest.class)
 @EnableAutoConfiguration
 @ComponentScan({"com.yomahub.liteflow.test.monitorFile.cmp"})
-public class MonitorFileELDeclMultiSpringbootTest {
+public class MonitorFileELDeclMultiSpringbootTest extends BaseTest {
     @Resource
     private FlowExecutor flowExecutor;
 
@@ -33,7 +34,7 @@ public class MonitorFileELDeclMultiSpringbootTest {
         String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
         FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
 
-        Thread.sleep(1000);
+        Thread.sleep(1500);
 
         LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
         Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());

+ 1 - 1
liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/monitorFile/MonitorFileELDeclSpringbootTest.java

@@ -34,7 +34,7 @@ public class MonitorFileELDeclSpringbootTest extends BaseTest {
         String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
         FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
 
-        Thread.sleep(1000);
+        Thread.sleep(1500);
 
         LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
         Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());

+ 1 - 1
liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/refreshRule/RefreshRuleELDeclSpringbootTest.java

@@ -46,7 +46,7 @@ public class RefreshRuleELDeclSpringbootTest extends BaseTest {
     public void testRefresh2() throws Exception{
         new Thread(() -> {
             try {
-                Thread.sleep(3000L);
+                Thread.sleep(2000L);
                 String content = ResourceUtil.readUtf8Str("classpath: /refreshRule/flow_update.el.xml");
                 FlowBus.refreshFlowMetaData(FlowParserTypeEnum.TYPE_EL_XML, content);
             } catch (Exception e) {

+ 1 - 1
liteflow-testcase-el/liteflow-testcase-el-script-groovy-springboot/src/test/java/com/yomahub/liteflow/test/script/groovy/monitorFile/MonitorFileGroovyELTest.java

@@ -36,7 +36,7 @@ public class MonitorFileGroovyELTest extends BaseTest {
         String newContent = content.replace("a=3", "a=2");
         FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
 
-        Thread.sleep(1000);
+        Thread.sleep(1500);
 
         LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
         DefaultContext context = response.getFirstContextBean();

+ 3 - 2
liteflow-testcase-el/liteflow-testcase-el-solon/src/test/java/com/yomahub/liteflow/test/monitorFile/MonitorFileELSpringbootTest.java

@@ -5,6 +5,7 @@ import cn.hutool.core.io.resource.ClassPathResource;
 import cn.hutool.core.util.CharsetUtil;
 import com.yomahub.liteflow.core.FlowExecutor;
 import com.yomahub.liteflow.flow.LiteflowResponse;
+import com.yomahub.liteflow.test.BaseTest;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -16,7 +17,7 @@ import java.io.File;
 
 @RunWith(SolonJUnit4ClassRunner.class)
 @TestPropertySource("classpath:/monitorFile/application.properties")
-public class MonitorFileELSpringbootTest {
+public class MonitorFileELSpringbootTest extends BaseTest {
 
     @Inject
     private FlowExecutor flowExecutor;
@@ -28,7 +29,7 @@ public class MonitorFileELSpringbootTest {
         String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
         FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
 
-        Thread.sleep(1000);
+        Thread.sleep(1500);
 
         LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
         Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());

+ 3 - 2
liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/monitorFile/MonitorFileELSpringbootTest.java

@@ -5,6 +5,7 @@ import cn.hutool.core.io.resource.ClassPathResource;
 import cn.hutool.core.util.CharsetUtil;
 import com.yomahub.liteflow.core.FlowExecutor;
 import com.yomahub.liteflow.flow.LiteflowResponse;
+import com.yomahub.liteflow.test.BaseTest;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -22,7 +23,7 @@ import java.io.File;
 @SpringBootTest(classes = MonitorFileELSpringbootTest.class)
 @EnableAutoConfiguration
 @ComponentScan({"com.yomahub.liteflow.test.monitorFile.cmp"})
-public class MonitorFileELSpringbootTest {
+public class MonitorFileELSpringbootTest extends BaseTest {
 
     @Resource
     private FlowExecutor flowExecutor;
@@ -34,7 +35,7 @@ public class MonitorFileELSpringbootTest {
         String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
         FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
 
-        Thread.sleep(1000);
+        Thread.sleep(1500);
 
         LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
         Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());

+ 1 - 1
pom.xml

@@ -39,7 +39,7 @@
 	</scm>
 
 	<properties>
-		<revision>2.9.7</revision>
+		<revision>2.9.8</revision>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 		<maven.compiler.source>8</maven.compiler.source>