enhancement #I6Q061 WHEN组件最大等待时间希望能支持到毫秒级别,或者可以通过配置TimeUnit来指定

This commit is contained in:
everywhere.z
2023-05-04 00:47:14 +08:00
parent b74a305eea
commit 3518464fb3
9 changed files with 121 additions and 44 deletions

View File

@@ -10,6 +10,8 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.concurrent.TimeUnit;
/**
* 非spring环境下参数单元测试
*
@@ -33,7 +35,8 @@ public class LiteflowConfigTest1 extends BaseTest {
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
Assert.assertTrue(response.isSuccess());
Assert.assertEquals("config/flow.el.xml", config.getRuleSource());
Assert.assertEquals(15, config.getWhenMaxWaitSeconds().intValue());
Assert.assertEquals(15000, config.getWhenMaxWaitTime().intValue());
Assert.assertEquals(TimeUnit.MILLISECONDS, config.getWhenMaxWaitTimeUnit());
Assert.assertEquals(200, config.getQueueLimit().intValue());
Assert.assertEquals(300000L, config.getDelay().longValue());
Assert.assertEquals(300000L, config.getPeriod().longValue());