mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
优化monitor file的测试用例
This commit is contained in:
@@ -11,7 +11,7 @@ LiteFlow是一个轻量且强大的国产规则引擎框架,可用于复杂的
|
|||||||
|
|
||||||
LiteFlow于2020年正式开源,2021年获得开源中国年度最受欢迎开源软件殊荣。于2022年获得Gitee最有价值开源项目(GVP)荣誉。是一个正处在高速发展中的开源项目。
|
LiteFlow于2020年正式开源,2021年获得开源中国年度最受欢迎开源软件殊荣。于2022年获得Gitee最有价值开源项目(GVP)荣誉。是一个正处在高速发展中的开源项目。
|
||||||
|
|
||||||
LiteFlow是一个由社区驱动的项目,我们非常重视社区建设,拥有一个1800多人的使用者社区,在使用中碰到任何问题或者建议都可以在社区中反应。
|
LiteFlow是一个由社区驱动的项目,我们非常重视社区建设,拥有一个2500多人的使用者社区,在使用中碰到任何问题或者建议都可以在社区中反应。
|
||||||
|
|
||||||
你在官网中可以找到加入社区的方式!
|
你在官网中可以找到加入社区的方式!
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ LiteFlow利用规则表达式为驱动引擎,去驱动你定义的组件。你
|
|||||||
|
|
||||||
LiteFlow拥有极其详细易懂的文档体系,能帮助你解决在使用框架的时候95%以上的问题。
|
LiteFlow拥有极其详细易懂的文档体系,能帮助你解决在使用框架的时候95%以上的问题。
|
||||||
|
|
||||||
目前为止,LiteFlow拥有800多个测试用例,并且不断在增加中。完备的文档+覆盖全面的测试用例保障了LiteFlow框架的稳定性!
|
目前为止,LiteFlow拥有900多个测试用例,并且不断在增加中。完备的文档+覆盖全面的测试用例保障了LiteFlow框架的稳定性!
|
||||||
|
|
||||||
LiteFlow期待你的了解!
|
LiteFlow期待你的了解!
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class MonitorFileELDeclMultiSpringbootTest extends BaseTest {
|
|||||||
String content = FileUtil.readUtf8String(absolutePath);
|
String content = FileUtil.readUtf8String(absolutePath);
|
||||||
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
||||||
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
||||||
|
Thread.sleep(1000L);
|
||||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||||
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class MonitorFileELDeclSpringbootTest extends BaseTest {
|
|||||||
String content = FileUtil.readUtf8String(absolutePath);
|
String content = FileUtil.readUtf8String(absolutePath);
|
||||||
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
||||||
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
||||||
|
Thread.sleep(1000L);
|
||||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||||
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class LiteflowMonitorFileTest extends BaseTest {
|
|||||||
String content = FileUtil.readUtf8String(absolutePath);
|
String content = FileUtil.readUtf8String(absolutePath);
|
||||||
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
||||||
FileUtil.writeString(newContent, new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
FileUtil.writeString(newContent, new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
||||||
|
Thread.sleep(1000L);
|
||||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||||
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class MonitorFileGroovyELTest extends BaseTest {
|
|||||||
String newContent = content.replace("a=3", "a=2");
|
String newContent = content.replace("a=3", "a=2");
|
||||||
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
||||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||||
|
Thread.sleep(1000L);
|
||||||
DefaultContext context = response.getFirstContextBean();
|
DefaultContext context = response.getFirstContextBean();
|
||||||
Assert.assertTrue(response.isSuccess());
|
Assert.assertTrue(response.isSuccess());
|
||||||
Assert.assertEquals(Integer.valueOf(4), context.getData("s1"));
|
Assert.assertEquals(Integer.valueOf(4), context.getData("s1"));
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class MonitorFileELSpringbootTest extends BaseTest {
|
|||||||
String content = FileUtil.readUtf8String(absolutePath);
|
String content = FileUtil.readUtf8String(absolutePath);
|
||||||
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
||||||
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
||||||
|
Thread.sleep(1000L);
|
||||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||||
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class MonitorFileELSpringbootTest extends BaseTest {
|
|||||||
String content = FileUtil.readUtf8String(absolutePath);
|
String content = FileUtil.readUtf8String(absolutePath);
|
||||||
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
String newContent = content.replace("THEN(a, b, c);", "THEN(a, c, b);");
|
||||||
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
FileUtil.writeString(newContent,new File(absolutePath), CharsetUtil.CHARSET_UTF_8);
|
||||||
|
Thread.sleep(1000L);
|
||||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||||
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
Assert.assertEquals("a==>c==>b", response.getExecuteStepStr());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user