Skip to content

Commit 5bd43c5

Browse files
committed
feat: fix style
1 parent 8cd92d5 commit 5bd43c5

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

trpc-container/trpc-container-default/src/test/java/com/tencent/trpc/container/config/yaml/YamlApplicationConfigParserTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public void after() {
4747

4848
@Test
4949
public void parse() {
50+
ConfigManager.stopTest();
5051
ConfigManager applicationConfig =
5152
new YamlApplicationConfigParser().parseFromClassPath("trpc_java_parse_test.yaml");
5253
assert applicationConfig != null;
@@ -227,7 +228,7 @@ public void checkServerConfig(ConfigManager applicationConfig) {
227228
assertEquals(serviceConfig.getRegistries().get("polaris").get("token"),
228229
"xxxx");
229230
assertEquals(serviceConfig.getRegistries().get("polaris2").get("token"),
230-
"xxx");
231+
"xxxx");
231232
ProviderConfig providerConfig = serviceConfig.getProviderConfigs().get(0);
232233
assertEquals(providerConfig.getRefClazz(), "com.tencent.trpc.container.demo.GreeterServiceImp");
233234
assertEquals(serviceConfig.getWorkerPool(), "woker_pool_provider_test2");
@@ -259,6 +260,7 @@ public void checkServerConfig(ConfigManager applicationConfig) {
259260

260261
@Test
261262
public void testServerIpParse() {
263+
ConfigManager.stopTest();
262264
ConfigManager applicationConfig = new YamlApplicationConfigParser()
263265
.parseFromClassPath("trpc_java_ip_parse_test.yaml");
264266
applicationConfig.setDefault();
@@ -271,13 +273,15 @@ public void testServerIpParse() {
271273

272274
@Test
273275
public void testParseMap() {
276+
ConfigManager.stopTest();
274277
String path = YamlParser.class.getClassLoader().getResource("trpc_java.yaml").getPath();
275278
Map<String, Object> map = new YamlApplicationConfigParser().parseMap(path);
276279
Assert.assertNotEquals(map.size(), 0);
277280
}
278281

279282
@Test
280283
public void testParseMap_confPath() {
284+
ConfigManager.stopTest();
281285
TRpcSystemProperties.setProperties(TRpcSystemProperties.CONFIG_PATH, "");
282286
Map<String, Object> map1 = new YamlApplicationConfigParser().parseMap("");
283287
Assert.assertNotNull(map1);
@@ -314,7 +318,7 @@ public void testParseImpls() {
314318

315319
@Test
316320
public void testEx() {
317-
321+
ConfigManager.stopTest();
318322
try {
319323
new YamlApplicationConfigParser().parseMap("abc");
320324
TRpcSystemProperties.setProperties(TRpcSystemProperties.CONFIG_PATH, "abc");

trpc-container/trpc-container-default/src/test/resources/trpc_java_parse_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ server:
6767
registrys:
6868
polaris2:
6969
namespace: java-sdk-test-service2
70-
token: xxx
70+
token: xxxx
7171
instance_id: feda4ceffed0b7b08cf5ec665dcd320e50434549
7272
name: trpc.TestApp.TestServer.Greeter3
7373

trpc-spring-boot-starters/trpc-spring-boot-starter/src/test/resources/trpc_java_default-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ plugins:
151151
register_self: true
152152
service:
153153
- namespace: java-sdk-test-service1 #环境类型,分正式production和非正式development两种类型
154-
token: xxxxx #服务注册所需要的 token
154+
token: xxxx #服务注册所需要的 token
155155
instance_id: feda4ceffed0b7b08cf5ec665dcd320e50434549 #服务注册所需要的 id
156156
name: trpc.TestApp.TestServer.Greeter
157157
selector:

0 commit comments

Comments
 (0)