mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
bug #I88U0Q SQL插件当eldata字段为空时,启动失败
This commit is contained in:
@@ -18,6 +18,6 @@ public class BaseTest {
|
||||
SpiFactoryCleaner.clean();
|
||||
LiteflowConfigGetter.clean();
|
||||
FlowInitHook.cleanHook();
|
||||
FlowBus.clearStat();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ public class NacosWithXmlELSpringbootTest extends BaseTest {
|
||||
@AfterEach
|
||||
public void after() {
|
||||
FlowBus.cleanCache();
|
||||
FlowBus.clearStat();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -55,17 +56,17 @@ public class NacosWithXmlELSpringbootTest extends BaseTest {
|
||||
|
||||
@Test
|
||||
public void testNacosWithXml2() throws Exception {
|
||||
String flowXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><flow><chain name=\"chain1\">THEN(a, b, c);</chain></flow>";
|
||||
String changedFlowXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><flow><chain name=\"chain1\">THEN(a, c);</chain></flow>";
|
||||
String flowXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><flow><chain name=\"chain2\">THEN(a, b, c);</chain></flow>";
|
||||
String changedFlowXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><flow><chain name=\"chain2\">THEN(a, c);</chain></flow>";
|
||||
when(nacosConfigService.getConfig(anyString(), anyString(), anyLong())).thenReturn(flowXml)
|
||||
.thenReturn(changedFlowXml);
|
||||
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg");
|
||||
Assertions.assertEquals("a==>b==>c", response.getExecuteStepStrWithoutTime());
|
||||
|
||||
FlowBus.refreshFlowMetaData(FlowParserTypeEnum.TYPE_EL_XML, changedFlowXml);
|
||||
|
||||
response = flowExecutor.execute2Resp("chain1", "arg");
|
||||
response = flowExecutor.execute2Resp("chain2", "arg");
|
||||
Assertions.assertEquals("a==>c", response.getExecuteStepStrWithoutTime());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user