mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
优化monitorFile的测试用例
This commit is contained in:
@@ -37,7 +37,7 @@ public class MonitorFileELDeclMultiSpringbootTest extends BaseTest {
|
||||
String content = FileUtil.readUtf8String(absolutePath);
|
||||
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(3000);
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||
Assertions.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MonitorFileELDeclSpringbootTest extends BaseTest {
|
||||
String content = FileUtil.readUtf8String(absolutePath);
|
||||
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(3000);
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||
Assertions.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class MonitorFileELSpringbootTest extends BaseTest {
|
||||
// 再次变更正确
|
||||
newContent = content.replace("THEN(a, b, c);", "THEN(c, b, a);");
|
||||
FileUtil.writeString(newContent, new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(3000);
|
||||
LiteflowResponse reloadSuccessResponse = flowExecutor.execute2Resp("chain1", "arg");
|
||||
Assertions.assertEquals("c==>b==>a", reloadSuccessResponse.getExecuteStepStr());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user