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