Merge branch 'opengoofy:develop' into develop

pull/709/head
Gdk666 2 years ago committed by GitHub
commit 7efaaff4d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -66,11 +66,7 @@ Hippo-4J 通过对 JDK 线程池增强,以及扩展三方框架底层线程池
Hippo-4J 获得的成就属于每一位贡献者!如果有意贡献,请参考 [good first issue](https://github.com/opengoofy/hippo4j/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) 或者 [good pro issue](https://github.com/opengoofy/hippo4j/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+pro+issue%22)。
<a href="https://github.com/opengoofy/hippo4j/graphs/contributors">
<img src="https://contrib.rocks/image?repo=opengoofy/hippo4j" />
</a>
<a href="https://github.com/opengoofy/hippo4j/graphs/contributors"><img src="https://opencollective.com/hippo4j/contributors.svg?width=890&button=false" /></a>
## 谁在使用

@ -17,8 +17,32 @@
package cn.hippo4j.config.toolkit;
import cn.hippo4j.common.toolkit.Assert;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import java.util.Objects;
import static cn.hippo4j.common.constant.Constants.LONG_PULLING_CLIENT_IDENTIFICATION;
/**
* RequestUtil Test
*/
public class RequestUtilTest {
@Test
public void existClientIdentifyTest() {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(LONG_PULLING_CLIENT_IDENTIFICATION, "test");
String clientIdentify = RequestUtil.getClientIdentify(request);
Assert.isTrue(Objects.equals(clientIdentify, "test"));
}
@Test
public void notExistClientIdentifyTest() {
MockHttpServletRequest request = new MockHttpServletRequest();
String clientIdentify = RequestUtil.getClientIdentify(request);
Assert.isTrue(Objects.equals(clientIdentify, ""));
}
}

Loading…
Cancel
Save