diff --git a/opsli-modulars/opsli-modulars-system/src/test/java/LimiterTest.java b/opsli-modulars/opsli-modulars-system/src/test/java/LimiterTest.java new file mode 100644 index 0000000..23dcb1f --- /dev/null +++ b/opsli-modulars/opsli-modulars-system/src/test/java/LimiterTest.java @@ -0,0 +1,29 @@ +import cn.hutool.http.HttpUtil; +import com.google.common.collect.Maps; +import org.junit.Test; +import org.opsli.common.thread.refuse.AsyncProcessQueueReFuse; + +import java.util.Map; + +/** + * @BelongsProject: think-bboss-parent + * @BelongsPackage: PACKAGE_NAME + * @Author: Parker + * @CreateTime: 2021-01-05 17:17 + * @Description: 限流器测试 + */ +public class LimiterTest { + + @Test + public void test(){ + for (int i = 0; i < 1000; i++) { + AsyncProcessQueueReFuse.execute(()->{ + Map map = Maps.newHashMap(); + map.put("username","demo"); + String ret = HttpUtil.get("http://127.0.0.1:9000/think-bboss-thd/sys/slipCount", map); + System.out.println(ret); + }); + } + } + +}