解决组件重试会多次rollback的问题

This commit is contained in:
rain
2023-10-28 16:36:55 +08:00
parent 91a15af3c0
commit 6dbae72238
18 changed files with 203 additions and 1 deletions

View File

@@ -94,4 +94,12 @@ public class RollbackSpringbootTest extends BaseTest {
Assertions.assertEquals("321", context.getData("test"));
}
@Test
// 对重试的测试
public void testRetry() throws Exception {
LiteflowResponse response = flowExecutor.execute2Resp("chain10", "arg");
Assertions.assertFalse(response.isSuccess());
Assertions.assertEquals("n==>m", response.getRollbackStepStr());
}
}

View File

@@ -35,4 +35,8 @@
<chain name="chain9">
THEN(a.tag("1"), a.tag("2"), a.tag("3"), d);
</chain>
<chain name="chain10">
THEN( m, n );
</chain>
</flow>