diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/LiteflowResponse.java b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/LiteflowResponse.java index a5f48e051..9014a6a07 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/LiteflowResponse.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/LiteflowResponse.java @@ -1,8 +1,10 @@ package com.yomahub.liteflow.flow; +import com.yomahub.liteflow.flow.entity.CmpStep; import com.yomahub.liteflow.slot.Slot; import java.io.Serializable; +import java.util.Queue; /** * 执行结果封装类 @@ -64,4 +66,12 @@ public class LiteflowResponse implements Serializable { public T getContextBean(){ return getSlot().getContextBean(); } + + public Queue getExecuteSteps(){ + return getSlot().getExecuteSteps(); + } + + public String getExecuteStepStr(){ + return getSlot().getExecuteStepStr(); + } } diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java b/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java index 258f44944..a30e145db 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/property/LiteflowConfig.java @@ -8,6 +8,7 @@ */ package com.yomahub.liteflow.property; +import cn.hutool.core.util.BooleanUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.sun.org.apache.xpath.internal.operations.Bool; @@ -82,6 +83,9 @@ public class LiteflowConfig { //FlowExecutor的execute2Future的自定义线程池 private String mainExecutorClass; + //是否打印执行中的日志 + private Boolean printExecutionLog; + public Boolean getEnable() { if (ObjectUtil.isNull(enable)) { return true; @@ -305,4 +309,16 @@ public class LiteflowConfig { public void setMainExecutorClass(String mainExecutorClass) { this.mainExecutorClass = mainExecutorClass; } + + public Boolean getPrintExecutionLog() { + if (ObjectUtil.isNull(printExecutionLog)){ + return Boolean.TRUE; + }else{ + return printExecutionLog; + } + } + + public void setPrintExecutionLog(Boolean printExecutionLog) { + this.printExecutionLog = printExecutionLog; + } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java index 0b6fa51d8..9c2e18928 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java @@ -41,7 +41,7 @@ public class AsyncNodeSpringbootTest extends BaseTest { public void testAsyncFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a base request"); Assert.assertTrue(response.isSuccess()); - System.out.println(response.getSlot().getExecuteStepStr()); + System.out.println(response.getExecuteStepStr()); } //这个和test1有点类似,只不过进一步验证了步骤 @@ -51,7 +51,7 @@ public class AsyncNodeSpringbootTest extends BaseTest { Assert.assertTrue(ListUtil.toList("b==>j==>g==>f==>h","b==>j==>g==>h==>f", "b==>j==>h==>g==>f","b==>j==>h==>f==>g", "b==>j==>f==>h==>g","b==>j==>f==>g==>h" - ).contains(response.getSlot().getExecuteStepStr())); + ).contains(response.getExecuteStepStr())); } //测试errorResume,默认的errorResume为false,这里测试默认的 diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java index 0c481ddb4..0bbf7fc63 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java @@ -85,7 +85,7 @@ public class BuilderSpringbootTest1 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } //基于普通组件的builder模式测试 @@ -143,7 +143,7 @@ public class BuilderSpringbootTest1 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } @@ -212,6 +212,6 @@ public class BuilderSpringbootTest1 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java index a8363f88b..8906dc70e 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java @@ -36,6 +36,6 @@ public class BuilderSpringbootTest2 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("h==>i==>j", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("h==>i==>j", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java index c13b2654e..30770cfde 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java @@ -36,7 +36,7 @@ public class LiteflowRetrySpringbootTest extends BaseTest { public void testRetry1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>b", response.getExecuteStepStr()); } //单个组件重试配置测试 @@ -44,7 +44,7 @@ public class LiteflowRetrySpringbootTest extends BaseTest { public void testRetry2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getExecuteStepStr()); } //单个组件指定异常,但抛出的并不是指定异常的场景测试 @@ -59,6 +59,6 @@ public class LiteflowRetrySpringbootTest extends BaseTest { public void testRetry4() { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java index 570b7e41c..f3833fd26 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java @@ -65,7 +65,7 @@ public class FlowExecutorSpringbootTest extends BaseTest { public void testIsEnd() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain4", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d",response.getExecuteStepStr()); } //setIsEnd方法的功能点测试 @@ -73,7 +73,7 @@ public class FlowExecutorSpringbootTest extends BaseTest { public void testSetIsEnd1() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain5", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("e",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e",response.getExecuteStepStr()); } //条件组件的功能点测试 @@ -88,7 +88,7 @@ public class FlowExecutorSpringbootTest extends BaseTest { public void testSetIsEnd2() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain7", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g",response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java index e8928668e..eed3cd4cf 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java @@ -33,6 +33,6 @@ public class FlowMetaSpringbootTest extends BaseTest { FlowBus.addCommonNode("d", "d组件", DCmp.class.getName()); LiteflowResponse response= flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>d[d组件]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>d[d组件]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java index 2e0d64432..ba1d98ba0 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java @@ -34,6 +34,6 @@ public class LiteflowComponentSpringbootTest extends BaseTest { public void testConfig() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[A组件]==>b[B组件]==>c[C组件]==>b[B组件]==>a[A组件]==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[A组件]==>b[B组件]==>c[C组件]==>b[B组件]==>a[A组件]==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java index 9234942fe..2ce1f1c4e 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java @@ -34,9 +34,9 @@ public class LiteflowMultipleTypeSpringbootTest extends BaseTest { public void testMultipleType() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a", response.getExecuteStepStr()); response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java index 33f9fe1c4..bc6871a74 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java @@ -38,7 +38,7 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a", response.getExecuteStepStr()); } //默认执行器测试+全局重试配置测试 @@ -47,7 +47,7 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("b==>b==>b", response.getExecuteStepStr()); } //自定义执行器测试 @@ -55,7 +55,7 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { public void testCustomerExecutor() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c", response.getExecuteStepStr()); } //自定义执行器测试+全局重试配置测试 @@ -64,6 +64,6 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); Assert.assertEquals(CustomerNodeExecutorAndCustomRetry.class, response.getContextBean().getData("retryLogic")); - Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java index 6fe7a8bc8..2fec1619b 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java @@ -35,7 +35,7 @@ public class PreAndFinallySpringbootTest extends BaseTest { public void testPreAndFinally1() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试pre和finally节点不放在开头和结尾的情况 @@ -43,7 +43,7 @@ public class PreAndFinallySpringbootTest extends BaseTest { public void testPreAndFinally2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试有节点报错是否还执行finally节点的情况,其中d节点会报错,但依旧执行f1,f2节点 @@ -51,7 +51,7 @@ public class PreAndFinallySpringbootTest extends BaseTest { public void testPreAndFinally3() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getExecuteStepStr()); } //测试在finally节点里是否能获取exception diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java index b539678b2..ea9af06fc 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java @@ -39,7 +39,7 @@ public class ImplicitSubFlowSpringbootTest extends BaseTest { public void testImplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("f==>g==>h==>m", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("f==>g==>h==>m", response.getExecuteStepStr()); // 传递了slotIndex,则set的size==1 Assert.assertEquals(1, RUN_TIME_SLOT.size()); diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java index 227df88cc..2e67e1f29 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java @@ -38,7 +38,7 @@ public class SubflowInDifferentConfigSpringbootTest extends BaseTest { public void testExplicitSubFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getExecuteStepStr()); } @Autowired diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java index f5324f056..e44a7d12d 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java @@ -35,6 +35,6 @@ public class SubflowJsonSpringBootTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java index f56390faa..a3dafab98 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java @@ -35,6 +35,6 @@ public class SubflowXMLSpringBootTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java index 70ce5f23c..d4c5b6b7a 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java @@ -35,6 +35,6 @@ public class SubflowYmlSpringBootTest extends BaseTest { public void testExplicitSubFlowYml() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java index 1649d2ee2..ded006a83 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java @@ -42,7 +42,7 @@ public class NodeTagSpringbootJsonTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -62,6 +62,6 @@ public class NodeTagSpringbootJsonTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java index f632b20c5..b9769eed0 100644 --- a/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java +++ b/liteflow-testcase-declare-component/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java @@ -42,7 +42,7 @@ public class NodeTagSpringbootXmlTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -62,6 +62,6 @@ public class NodeTagSpringbootXmlTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeTest.java index 3e7cf0b62..17dd22488 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeTest.java @@ -38,7 +38,7 @@ public class AsyncNodeTest extends BaseTest { public void testAsyncFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a base request"); Assert.assertTrue(response.isSuccess()); - System.out.println(response.getSlot().getExecuteStepStr()); + System.out.println(response.getExecuteStepStr()); } //这个和test1有点类似,只不过进一步验证了步骤 @@ -48,7 +48,7 @@ public class AsyncNodeTest extends BaseTest { Assert.assertTrue(ListUtil.toList("b==>j==>g==>f==>h","b==>j==>g==>h==>f", "b==>j==>h==>g==>f","b==>j==>h==>f==>g", "b==>j==>f==>h==>g","b==>j==>f==>g==>h" - ).contains(response.getSlot().getExecuteStepStr())); + ).contains(response.getExecuteStepStr())); } //测试errorResume,默认的errorResume为false,这里测试默认的 diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/builder/BuilderTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/builder/BuilderTest.java index 21d078f0c..ab8c1a631 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/builder/BuilderTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/builder/BuilderTest.java @@ -87,7 +87,7 @@ public class BuilderTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } //基于普通组件的builder模式测试 @@ -144,7 +144,7 @@ public class BuilderTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } //基于普通组件的builder模式测试 @@ -212,6 +212,6 @@ public class BuilderTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetryTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetryTest.java index b1e4448b2..6243f6c42 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetryTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetryTest.java @@ -34,7 +34,7 @@ public class LiteflowRetryTest extends BaseTest { public void testRetry1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>b", response.getExecuteStepStr()); } //单个组件重试配置测试 @@ -42,7 +42,7 @@ public class LiteflowRetryTest extends BaseTest { public void testRetry2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getExecuteStepStr()); } //单个组件指定异常,但抛出的并不是指定异常的场景测试 @@ -57,6 +57,6 @@ public class LiteflowRetryTest extends BaseTest { public void testRetry4() { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorTest.java index 0a5104e00..e180fe894 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorTest.java @@ -57,7 +57,7 @@ public class FlowExecutorTest extends BaseTest { public void testIsEnd() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain4", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d",response.getExecuteStepStr()); } //setIsEnd方法的功能点测试 @@ -65,7 +65,7 @@ public class FlowExecutorTest extends BaseTest { public void testSetIsEnd1() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain5", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("e",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e",response.getExecuteStepStr()); } //条件组件的功能点测试 @@ -80,6 +80,6 @@ public class FlowExecutorTest extends BaseTest { public void testSetIsEnd2() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain7", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g",response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaTest.java index 789201bd3..f3a5a4b4c 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaTest.java @@ -30,6 +30,6 @@ public class FlowMetaTest extends BaseTest { FlowBus.addCommonNode("d", "d组件", DCmp.class); LiteflowResponse response= flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>d[d组件]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>d[d组件]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeTest.java index 7c890da7a..255245800 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeTest.java @@ -31,9 +31,9 @@ public class LiteflowMultipleTypeTest extends BaseTest { public void testMultipleType() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a", response.getExecuteStepStr()); response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorTest.java index 30e54afe1..d771fbf9f 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorTest.java @@ -36,7 +36,7 @@ public class LiteflowNodeExecutorTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a", response.getExecuteStepStr()); } //默认执行器测试+全局重试配置测试 @@ -45,7 +45,7 @@ public class LiteflowNodeExecutorTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("b==>b==>b", response.getExecuteStepStr()); } //自定义执行器测试 @@ -53,7 +53,7 @@ public class LiteflowNodeExecutorTest extends BaseTest { public void testCustomerExecutor() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c", response.getExecuteStepStr()); } //自定义执行器测试+全局重试配置测试 @@ -62,6 +62,6 @@ public class LiteflowNodeExecutorTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); Assert.assertEquals(CustomerNodeExecutorAndCustomRetry.class, response.getContextBean().getData("retryLogic")); - Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallyTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallyTest.java index b205fc606..b9db2d65c 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallyTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallyTest.java @@ -31,7 +31,7 @@ public class PreAndFinallyTest extends BaseTest { public void testPreAndFinally1() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试pre和finally节点不放在开头和结尾的情况 @@ -39,7 +39,7 @@ public class PreAndFinallyTest extends BaseTest { public void testPreAndFinally2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试有节点报错是否还执行finally节点的情况,其中d节点会报错,但依旧执行f1,f2节点 @@ -47,7 +47,7 @@ public class PreAndFinallyTest extends BaseTest { public void testPreAndFinally3() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getExecuteStepStr()); } //测试在finally节点里是否能获取exception diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowTest.java index d75940b7b..20f649af5 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowTest.java @@ -36,7 +36,7 @@ public class ImplicitSubFlowTest extends BaseTest { public void testImplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("f==>g==>h==>m", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("f==>g==>h==>m", response.getExecuteStepStr()); // 传递了slotIndex,则set的size==1 Assert.assertEquals(1, RUN_TIME_SLOT.size()); diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigTest.java index df275f2d9..81f61cabc 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigTest.java @@ -33,7 +33,7 @@ public class SubflowInDifferentConfigTest extends BaseTest { public void testExplicitSubFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getExecuteStepStr()); } //主要测试有不同的配置类型后会不会报出既定的错误 diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonTest.java index 9df6b1975..360985937 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonTest.java @@ -32,6 +32,6 @@ public class SubflowJsonTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLTest.java index ee4b1caec..9f5fbe96b 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLTest.java @@ -32,6 +32,6 @@ public class SubflowXMLTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlTest.java index 8baa1e5ec..6cb70df68 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlTest.java @@ -32,6 +32,6 @@ public class SubflowYmlTest extends BaseTest { public void testExplicitSubFlowYml() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagJsonTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagJsonTest.java index 491a4815b..883892c19 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagJsonTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagJsonTest.java @@ -38,7 +38,7 @@ public class NodeTagJsonTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -58,6 +58,6 @@ public class NodeTagJsonTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagXmlTest.java b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagXmlTest.java index 55adbbbb7..3fa737313 100644 --- a/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagXmlTest.java +++ b/liteflow-testcase-nospring/src/test/java/com/yomahub/liteflow/test/tag/NodeTagXmlTest.java @@ -38,7 +38,7 @@ public class NodeTagXmlTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -58,6 +58,6 @@ public class NodeTagXmlTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteFlowXmlScriptBuilderGroovyTest.java b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteFlowXmlScriptBuilderGroovyTest.java index 876f6f7e2..ace7db6c8 100644 --- a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteFlowXmlScriptBuilderGroovyTest.java +++ b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteFlowXmlScriptBuilderGroovyTest.java @@ -91,6 +91,6 @@ public class LiteFlowXmlScriptBuilderGroovyTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain2","arg1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d[组件D]==>s2[条件脚本S2]==>a[组件A]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d[组件D]==>s2[条件脚本S2]==>a[组件A]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptFileGroovyTest.java b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptFileGroovyTest.java index 07bdc4a3d..7717a4883 100644 --- a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptFileGroovyTest.java +++ b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptFileGroovyTest.java @@ -47,7 +47,7 @@ public class LiteflowJsonScriptFileGroovyTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", response.getExecuteStepStr()); } //测试脚本的热重载 @@ -56,7 +56,7 @@ public class LiteflowJsonScriptFileGroovyTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /json-script-file/flow_update.json"); //进行刷新 @@ -65,7 +65,7 @@ public class LiteflowJsonScriptFileGroovyTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } //测试脚本&规则平滑重载刷新 diff --git a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptGroovyTest.java b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptGroovyTest.java index 3201a7eb0..c97ff7ca2 100644 --- a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptGroovyTest.java +++ b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowJsonScriptGroovyTest.java @@ -47,7 +47,7 @@ public class LiteflowJsonScriptGroovyTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", response.getExecuteStepStr()); } //测试脚本的热重载 @@ -56,7 +56,7 @@ public class LiteflowJsonScriptGroovyTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /json-script/flow_update.json"); //进行刷新 @@ -65,6 +65,6 @@ public class LiteflowJsonScriptGroovyTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } } diff --git a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptFileGroovyTest.java b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptFileGroovyTest.java index e0926cb5e..a375541de 100644 --- a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptFileGroovyTest.java +++ b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptFileGroovyTest.java @@ -47,7 +47,7 @@ public class LiteflowXmlScriptFileGroovyTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", response.getExecuteStepStr()); } //测试脚本的热重载 @@ -56,7 +56,7 @@ public class LiteflowXmlScriptFileGroovyTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /xml-script-file/flow_update.xml"); //进行刷新 @@ -65,7 +65,7 @@ public class LiteflowXmlScriptFileGroovyTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } //测试脚本&规则平滑重载刷新 diff --git a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptGroovyTest.java b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptGroovyTest.java index aac83f144..bcec4aece 100644 --- a/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptGroovyTest.java +++ b/liteflow-testcase-script-groovy/src/test/java/com/yomahub/liteflow/test/script/groovy/LiteflowXmlScriptGroovyTest.java @@ -47,7 +47,7 @@ public class LiteflowXmlScriptGroovyTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", response.getExecuteStepStr()); } //测试脚本的热重载 @@ -56,7 +56,7 @@ public class LiteflowXmlScriptGroovyTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>a", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /xml-script/flow_update.xml"); //进行刷新 @@ -65,6 +65,6 @@ public class LiteflowXmlScriptGroovyTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>b==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } } diff --git a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteFlowXmlScriptBuilderQLExpressTest.java b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteFlowXmlScriptBuilderQLExpressTest.java index aa8d41f21..4c3e8c881 100644 --- a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteFlowXmlScriptBuilderQLExpressTest.java +++ b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteFlowXmlScriptBuilderQLExpressTest.java @@ -91,6 +91,6 @@ public class LiteFlowXmlScriptBuilderQLExpressTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain2","arg1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d[组件D]==>s2[条件脚本S2]==>b[组件B]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d[组件D]==>s2[条件脚本S2]==>b[组件B]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptFileQLExpressTest.java b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptFileQLExpressTest.java index 765d5514e..38341701e 100644 --- a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptFileQLExpressTest.java +++ b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptFileQLExpressTest.java @@ -47,7 +47,7 @@ public class LiteflowJsonScriptFileQLExpressTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", response.getExecuteStepStr()); } @Test @@ -55,7 +55,7 @@ public class LiteflowJsonScriptFileQLExpressTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /json-script-file/flow_update.json"); //进行刷新 @@ -64,7 +64,7 @@ public class LiteflowJsonScriptFileQLExpressTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } //测试脚本&规则平滑重载刷新 diff --git a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptQLExpressTest.java b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptQLExpressTest.java index e920d741a..17af9021d 100644 --- a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptQLExpressTest.java +++ b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowJsonScriptQLExpressTest.java @@ -47,7 +47,7 @@ public class LiteflowJsonScriptQLExpressTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", response.getExecuteStepStr()); } @Test @@ -55,7 +55,7 @@ public class LiteflowJsonScriptQLExpressTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /json-script/flow_update.json"); //进行刷新 @@ -64,6 +64,6 @@ public class LiteflowJsonScriptQLExpressTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } } diff --git a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptFileQLExpressTest.java b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptFileQLExpressTest.java index 31e9ea816..db7895dc9 100644 --- a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptFileQLExpressTest.java +++ b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptFileQLExpressTest.java @@ -47,7 +47,7 @@ public class LiteflowXmlScriptFileQLExpressTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", response.getExecuteStepStr()); } @Test @@ -55,7 +55,7 @@ public class LiteflowXmlScriptFileQLExpressTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /xml-script-file/flow_update.xml"); //进行刷新 @@ -64,7 +64,7 @@ public class LiteflowXmlScriptFileQLExpressTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } //测试脚本&规则平滑重载刷新 diff --git a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptQLExpressTest.java b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptQLExpressTest.java index 62be1c773..cceacf9a5 100644 --- a/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptQLExpressTest.java +++ b/liteflow-testcase-script-qlexpress/src/test/java/com/yomahub/liteflow/test/script/qlexpress/LiteflowXmlScriptQLExpressTest.java @@ -47,7 +47,7 @@ public class LiteflowXmlScriptQLExpressTest extends BaseTest { public void testScript2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", response.getExecuteStepStr()); } @Test @@ -55,7 +55,7 @@ public class LiteflowXmlScriptQLExpressTest extends BaseTest { //根据配置,加载的应该是flow.xml,执行原来的规则 LiteflowResponse responseOld = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseOld.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本]==>b", responseOld.getExecuteStepStr()); //更改规则,重新加载,更改的规则内容从flow_update.xml里读取,这里只是为了模拟下获取新的内容。不一定是从文件中读取 String newContent = ResourceUtil.readUtf8Str("classpath: /xml-script/flow_update.xml"); //进行刷新 @@ -64,6 +64,6 @@ public class LiteflowXmlScriptQLExpressTest extends BaseTest { //重新执行chain2这个链路,结果会变 LiteflowResponse responseNew = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(responseNew.isSuccess()); - Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>s2[条件脚本_改]==>a==>s3[普通脚本_新增]", responseNew.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java index 0b6fa51d8..9c2e18928 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringbootTest.java @@ -41,7 +41,7 @@ public class AsyncNodeSpringbootTest extends BaseTest { public void testAsyncFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a base request"); Assert.assertTrue(response.isSuccess()); - System.out.println(response.getSlot().getExecuteStepStr()); + System.out.println(response.getExecuteStepStr()); } //这个和test1有点类似,只不过进一步验证了步骤 @@ -51,7 +51,7 @@ public class AsyncNodeSpringbootTest extends BaseTest { Assert.assertTrue(ListUtil.toList("b==>j==>g==>f==>h","b==>j==>g==>h==>f", "b==>j==>h==>g==>f","b==>j==>h==>f==>g", "b==>j==>f==>h==>g","b==>j==>f==>g==>h" - ).contains(response.getSlot().getExecuteStepStr())); + ).contains(response.getExecuteStepStr())); } //测试errorResume,默认的errorResume为false,这里测试默认的 diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java index 8c03fac97..a46bcaf10 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest1.java @@ -91,7 +91,7 @@ public class BuilderSpringbootTest1 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } //基于普通组件的builder模式测试 @@ -149,7 +149,7 @@ public class BuilderSpringbootTest1 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } @@ -218,6 +218,6 @@ public class BuilderSpringbootTest1 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[组件A]==>b[组件B]==>e[组件E]==>c[组件C]==>d[组件D]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java index a8363f88b..8906dc70e 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringbootTest2.java @@ -36,6 +36,6 @@ public class BuilderSpringbootTest2 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("h==>i==>j", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("h==>i==>j", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java index c13b2654e..30770cfde 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringbootTest.java @@ -36,7 +36,7 @@ public class LiteflowRetrySpringbootTest extends BaseTest { public void testRetry1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>b", response.getExecuteStepStr()); } //单个组件重试配置测试 @@ -44,7 +44,7 @@ public class LiteflowRetrySpringbootTest extends BaseTest { public void testRetry2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getExecuteStepStr()); } //单个组件指定异常,但抛出的并不是指定异常的场景测试 @@ -59,6 +59,6 @@ public class LiteflowRetrySpringbootTest extends BaseTest { public void testRetry4() { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java index 570b7e41c..f3833fd26 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/component/FlowExecutorSpringbootTest.java @@ -65,7 +65,7 @@ public class FlowExecutorSpringbootTest extends BaseTest { public void testIsEnd() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain4", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d",response.getExecuteStepStr()); } //setIsEnd方法的功能点测试 @@ -73,7 +73,7 @@ public class FlowExecutorSpringbootTest extends BaseTest { public void testSetIsEnd1() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain5", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("e",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e",response.getExecuteStepStr()); } //条件组件的功能点测试 @@ -88,7 +88,7 @@ public class FlowExecutorSpringbootTest extends BaseTest { public void testSetIsEnd2() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain7", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g",response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/config/LiteflowConfigSpringbootTest2.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/config/LiteflowConfigSpringbootTest2.java index d81c0bd78..9ad8769d3 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/config/LiteflowConfigSpringbootTest2.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/config/LiteflowConfigSpringbootTest2.java @@ -33,9 +33,9 @@ public class LiteflowConfigSpringbootTest2 extends BaseTest { @Test public void testRuleSourceMatch() { LiteflowResponse response0 = flowExecutor.execute2Resp("chain1", "arg"); - Assert.assertEquals("a==>b==>c", response0.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response0.getExecuteStepStr()); LiteflowResponse response1 = flowExecutor.execute2Resp("chain2", "arg"); - Assert.assertEquals("a==>c==>b==>d", response1.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>c==>b==>d", response1.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java index ad162c083..7f9d2f2ca 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringbootTest.java @@ -33,6 +33,6 @@ public class FlowMetaSpringbootTest extends BaseTest { FlowBus.addCommonNode("d", "d组件", DCmp.class); LiteflowResponse response= flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>d[d组件]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>d[d组件]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java index 2e0d64432..ba1d98ba0 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringbootTest.java @@ -34,6 +34,6 @@ public class LiteflowComponentSpringbootTest extends BaseTest { public void testConfig() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[A组件]==>b[B组件]==>c[C组件]==>b[B组件]==>a[A组件]==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[A组件]==>b[B组件]==>c[C组件]==>b[B组件]==>a[A组件]==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java index 9234942fe..2ce1f1c4e 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringbootTest.java @@ -34,9 +34,9 @@ public class LiteflowMultipleTypeSpringbootTest extends BaseTest { public void testMultipleType() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a", response.getExecuteStepStr()); response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java index 33f9fe1c4..bc6871a74 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringbootTest.java @@ -38,7 +38,7 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a", response.getExecuteStepStr()); } //默认执行器测试+全局重试配置测试 @@ -47,7 +47,7 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("b==>b==>b", response.getExecuteStepStr()); } //自定义执行器测试 @@ -55,7 +55,7 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { public void testCustomerExecutor() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c", response.getExecuteStepStr()); } //自定义执行器测试+全局重试配置测试 @@ -64,6 +64,6 @@ public class LiteflowNodeExecutorSpringbootTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); Assert.assertEquals(CustomerNodeExecutorAndCustomRetry.class, response.getContextBean().getData("retryLogic")); - Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java index 6fe7a8bc8..2fec1619b 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringbootTest.java @@ -35,7 +35,7 @@ public class PreAndFinallySpringbootTest extends BaseTest { public void testPreAndFinally1() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试pre和finally节点不放在开头和结尾的情况 @@ -43,7 +43,7 @@ public class PreAndFinallySpringbootTest extends BaseTest { public void testPreAndFinally2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试有节点报错是否还执行finally节点的情况,其中d节点会报错,但依旧执行f1,f2节点 @@ -51,7 +51,7 @@ public class PreAndFinallySpringbootTest extends BaseTest { public void testPreAndFinally3() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getExecuteStepStr()); } //测试在finally节点里是否能获取exception diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java index b539678b2..ea9af06fc 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringbootTest.java @@ -39,7 +39,7 @@ public class ImplicitSubFlowSpringbootTest extends BaseTest { public void testImplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("f==>g==>h==>m", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("f==>g==>h==>m", response.getExecuteStepStr()); // 传递了slotIndex,则set的size==1 Assert.assertEquals(1, RUN_TIME_SLOT.size()); diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java index 227df88cc..2e67e1f29 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringbootTest.java @@ -38,7 +38,7 @@ public class SubflowInDifferentConfigSpringbootTest extends BaseTest { public void testExplicitSubFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getExecuteStepStr()); } @Autowired diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java index f5324f056..e44a7d12d 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringBootTest.java @@ -35,6 +35,6 @@ public class SubflowJsonSpringBootTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java index f56390faa..a3dafab98 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringBootTest.java @@ -35,6 +35,6 @@ public class SubflowXMLSpringBootTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java index 70ce5f23c..d4c5b6b7a 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringBootTest.java @@ -35,6 +35,6 @@ public class SubflowYmlSpringBootTest extends BaseTest { public void testExplicitSubFlowYml() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java index 1649d2ee2..ded006a83 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootJsonTest.java @@ -42,7 +42,7 @@ public class NodeTagSpringbootJsonTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -62,6 +62,6 @@ public class NodeTagSpringbootJsonTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java index f632b20c5..b9769eed0 100644 --- a/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java +++ b/liteflow-testcase-springboot/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringbootXmlTest.java @@ -42,7 +42,7 @@ public class NodeTagSpringbootXmlTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -62,6 +62,6 @@ public class NodeTagSpringbootXmlTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringTest.java index deae82126..30eb622a2 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/asyncNode/AsyncNodeSpringTest.java @@ -35,7 +35,7 @@ public class AsyncNodeSpringTest extends BaseTest { public void testAsyncFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a base request"); Assert.assertTrue(response.isSuccess()); - System.out.println(response.getSlot().getExecuteStepStr()); + System.out.println(response.getExecuteStepStr()); } //这个和test1有点类似,只不过进一步验证了步骤 @@ -45,7 +45,7 @@ public class AsyncNodeSpringTest extends BaseTest { Assert.assertTrue(ListUtil.toList("b==>j==>g==>f==>h","b==>j==>g==>h==>f", "b==>j==>h==>g==>f","b==>j==>h==>f==>g", "b==>j==>f==>h==>g","b==>j==>f==>g==>h" - ).contains(response.getSlot().getExecuteStepStr())); + ).contains(response.getExecuteStepStr())); } //测试errorResume,默认的errorResume为false,这里测试默认的 diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/base/BaseCommonSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/base/BaseCommonSpringTest.java index 25fef41cb..8c98130d2 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/base/BaseCommonSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/base/BaseCommonSpringTest.java @@ -23,6 +23,6 @@ public class BaseCommonSpringTest extends BaseTest { public void testBaseCommon(){ LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringTest2.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringTest2.java index cc0ec515e..59c14736e 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringTest2.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/builder/BuilderSpringTest2.java @@ -32,6 +32,6 @@ public class BuilderSpringTest2 extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("h==>i==>j", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("h==>i==>j", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringTest.java index dc99d0b39..f65fb094e 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/cmpRetry/LiteflowRetrySpringTest.java @@ -32,7 +32,7 @@ public class LiteflowRetrySpringTest extends BaseTest { public void testRetry1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>b", response.getExecuteStepStr()); } //单个组件重试配置测试 @@ -40,7 +40,7 @@ public class LiteflowRetrySpringTest extends BaseTest { public void testRetry2() { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c==>c==>c==>c==>c==>c", response.getExecuteStepStr()); } //单个组件指定异常,但抛出的并不是指定异常的场景测试 @@ -55,6 +55,6 @@ public class LiteflowRetrySpringTest extends BaseTest { public void testRetry4() { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e==>e==>e==>e==>e==>e", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/component/ComponentSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/component/ComponentSpringTest.java index aee920bbd..2446dc22c 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/component/ComponentSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/component/ComponentSpringTest.java @@ -59,7 +59,7 @@ public class ComponentSpringTest extends BaseTest { public void testIsEnd() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain4", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("d",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d",response.getExecuteStepStr()); } //setIsEnd方法的功能点测试 @@ -67,7 +67,7 @@ public class ComponentSpringTest extends BaseTest { public void testSetIsEnd1() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain5", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("e",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("e",response.getExecuteStepStr()); } //条件组件的功能点测试 @@ -82,7 +82,7 @@ public class ComponentSpringTest extends BaseTest { public void testSetIsEnd2() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("chain7", 10); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g",response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/config/LocalRuleSourcePatternMatchSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/config/LocalRuleSourcePatternMatchSpringTest.java index 5eb6d3da5..b307988ac 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/config/LocalRuleSourcePatternMatchSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/config/LocalRuleSourcePatternMatchSpringTest.java @@ -32,8 +32,8 @@ public class LocalRuleSourcePatternMatchSpringTest extends BaseTest { @Test public void testLocalJsonRuleSourcePatternMatch() { LiteflowResponse response0 = executor.execute2Resp("chain1", "arg"); - Assert.assertEquals("a==>b==>c", response0.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response0.getExecuteStepStr()); LiteflowResponse response1 = executor.execute2Resp("chain3", "arg"); - Assert.assertEquals("a==>c==>f==>g", response1.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>c==>f==>g", response1.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringTest.java index b69df9a57..bbeb223d1 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/flowmeta/FlowMetaSpringTest.java @@ -27,6 +27,6 @@ public class FlowMetaSpringTest extends BaseTest { FlowBus.addCommonNode("d", "d组件", DCmp.class); LiteflowResponse response= flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>d[d组件]", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>d[d组件]", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringTest.java index d4a7c98d3..5b898e760 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/liteflowcomponent/LiteflowComponentSpringTest.java @@ -28,6 +28,6 @@ public class LiteflowComponentSpringTest extends BaseTest { public void testConfig() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a[A组件]==>b[B组件]==>c[C组件]==>b[B组件]==>a[A组件]==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a[A组件]==>b[B组件]==>c[C组件]==>b[B组件]==>a[A组件]==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringTest.java index dd10059cf..b378c3886 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/multipleType/LiteflowMultipleTypeSpringTest.java @@ -28,9 +28,9 @@ public class LiteflowMultipleTypeSpringTest extends BaseTest { public void testMultipleType() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a", response.getExecuteStepStr()); response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringTest.java index b2431903f..4f9a555ed 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/nodeExecutor/LiteflowNodeExecutorSpringTest.java @@ -32,7 +32,7 @@ public class LiteflowNodeExecutorSpringTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("a", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a", response.getExecuteStepStr()); } //默认执行器测试+全局重试配置测试 @@ -41,7 +41,7 @@ public class LiteflowNodeExecutorSpringTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); Assert.assertEquals(CustomerDefaultNodeExecutor.class, response.getContextBean().getData("customerDefaultNodeExecutor")); - Assert.assertEquals("b==>b==>b", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("b==>b==>b", response.getExecuteStepStr()); } //自定义执行器测试 @@ -49,7 +49,7 @@ public class LiteflowNodeExecutorSpringTest extends BaseTest { public void testCustomerExecutor() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("c", response.getExecuteStepStr()); } //自定义执行器测试+全局重试配置测试 @@ -58,6 +58,6 @@ public class LiteflowNodeExecutorSpringTest extends BaseTest { LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertFalse(response.isSuccess()); Assert.assertEquals(CustomerNodeExecutorAndCustomRetry.class, response.getContextBean().getData("retryLogic")); - Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("d==>d==>d==>d==>d==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringTest.java index 33f7bfbf7..662fd7607 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/preAndFinally/PreAndFinallySpringTest.java @@ -29,7 +29,7 @@ public class PreAndFinallySpringTest extends BaseTest { public void testPreAndFinally1() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试pre和finally节点不放在开头和结尾的情况 @@ -37,7 +37,7 @@ public class PreAndFinallySpringTest extends BaseTest { public void testPreAndFinally2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>b==>c==>f1==>f2",response.getExecuteStepStr()); } //测试有节点报错是否还执行finally节点的情况,其中d节点会报错,但依旧执行f1,f2节点 @@ -45,7 +45,7 @@ public class PreAndFinallySpringTest extends BaseTest { public void testPreAndFinally3() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg"); Assert.assertFalse(response.isSuccess()); - Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("p1==>p2==>a==>d==>f1==>f2", response.getExecuteStepStr()); } //测试在finally节点里是否能获取exception diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringTest.java index a93da1340..f4b712a8c 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/ImplicitSubFlowSpringTest.java @@ -33,7 +33,7 @@ public class ImplicitSubFlowSpringTest extends BaseTest { public void testImplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain3", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("f==>g==>h==>m", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("f==>g==>h==>m", response.getExecuteStepStr()); // 传递了slotIndex,则set的size==1 Assert.assertEquals(1, RUN_TIME_SLOT.size()); diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringTest.java index 39c459b8d..8e4afd691 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowInDifferentConfigSpringTest.java @@ -31,7 +31,7 @@ public class SubflowInDifferentConfigSpringTest extends BaseTest { public void testExplicitSubFlow1() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>b==>a==>e==>d", response.getExecuteStepStr()); } //主要测试有不同的配置类型后会不会报出既定的错误 diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringTest.java index cd81249e2..244770ee0 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowJsonSpringTest.java @@ -29,6 +29,6 @@ public class SubflowJsonSpringTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringTest.java index 0f6dc463d..e8d6f4678 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowXMLSpringTest.java @@ -29,6 +29,6 @@ public class SubflowXMLSpringTest extends BaseTest { public void testExplicitSubFlow() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringTest.java index 658165c33..a05ba2755 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/subflow/SubflowYmlSpringTest.java @@ -29,6 +29,6 @@ public class SubflowYmlSpringTest extends BaseTest { public void testExplicitSubFlowYml() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "it's a request"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c==>b==>a==>e==>d", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringJsonTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringJsonTest.java index ce1e908bf..16d6871de 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringJsonTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringJsonTest.java @@ -36,7 +36,7 @@ public class NodeTagSpringJsonTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -56,6 +56,6 @@ public class NodeTagSpringJsonTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringXmlTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringXmlTest.java index 283922255..4b6b840cc 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringXmlTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/tag/NodeTagSpringXmlTest.java @@ -36,7 +36,7 @@ public class NodeTagSpringXmlTest extends BaseTest { public void testTag2() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>a==>a==>c==>e", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>a==>a==>c==>e", response.getExecuteStepStr()); } //测试多线程when情况下的tag取值是否正确 @@ -56,6 +56,6 @@ public class NodeTagSpringXmlTest extends BaseTest { public void testTag4() throws Exception{ LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("g", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("g", response.getExecuteStepStr()); } } diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithJsonSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithJsonSpringTest.java index da28be002..02cca5ccc 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithJsonSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithJsonSpringTest.java @@ -68,7 +68,7 @@ public class ZkNodeWithJsonSpringTest extends BaseTest { public void test() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response.getExecuteStepStr()); } @AfterClass diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithXmlSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithXmlSpringTest.java index 4126a419c..ac00d8a2d 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithXmlSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithXmlSpringTest.java @@ -68,7 +68,7 @@ public class ZkNodeWithXmlSpringTest extends BaseTest { public void test() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response.getExecuteStepStr()); } @AfterClass diff --git a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithYmlSpringTest.java b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithYmlSpringTest.java index 3e4aa04d3..263beabf0 100644 --- a/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithYmlSpringTest.java +++ b/liteflow-testcase-springnative/src/test/java/com/yomahub/liteflow/test/zookeeper/ZkNodeWithYmlSpringTest.java @@ -68,7 +68,7 @@ public class ZkNodeWithYmlSpringTest extends BaseTest { public void test() { LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg"); Assert.assertTrue(response.isSuccess()); - Assert.assertEquals("a==>b==>c", response.getSlot().getExecuteStepStr()); + Assert.assertEquals("a==>b==>c", response.getExecuteStepStr()); } @AfterClass