|
@@ -112,6 +112,8 @@ public class TestSecurityUtil {
|
|
|
|
|
|
@Test
|
|
|
public void testBuildDTServiceName() {
|
|
|
+ SecurityUtil.setTokenServiceUseIp(true);
|
|
|
+
|
|
|
assertEquals("127.0.0.1:123",
|
|
|
SecurityUtil.buildDTServiceName(URI.create("test://LocalHost"), 123)
|
|
|
);
|
|
@@ -128,6 +130,8 @@ public class TestSecurityUtil {
|
|
|
|
|
|
@Test
|
|
|
public void testBuildTokenServiceSockAddr() {
|
|
|
+ SecurityUtil.setTokenServiceUseIp(true);
|
|
|
+
|
|
|
assertEquals("127.0.0.1:123",
|
|
|
SecurityUtil.buildTokenService(new InetSocketAddress("LocalHost", 123)).toString()
|
|
|
);
|