From 830c4a75ef61498cd6bbe29910e26348c8b43665 Mon Sep 17 00:00:00 2001 From: jarvisxiong Date: Fri, 8 Dec 2023 11:12:07 +0800 Subject: [PATCH] fix: remove useless test method of NacosConfigurationLoaderTest --- .../nacos/NacosConfigurationLoaderTest.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/trpc-configcenter/trpc-configcenter-nacos/src/test/java/com/tencent/trpc/configcenter/nacos/NacosConfigurationLoaderTest.java b/trpc-configcenter/trpc-configcenter-nacos/src/test/java/com/tencent/trpc/configcenter/nacos/NacosConfigurationLoaderTest.java index d778bf3b18..a77bd49550 100644 --- a/trpc-configcenter/trpc-configcenter-nacos/src/test/java/com/tencent/trpc/configcenter/nacos/NacosConfigurationLoaderTest.java +++ b/trpc-configcenter/trpc-configcenter-nacos/src/test/java/com/tencent/trpc/configcenter/nacos/NacosConfigurationLoaderTest.java @@ -35,7 +35,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; -import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -190,22 +189,6 @@ public void testGetValue() throws NacosException { Assert.assertEquals(configProperties.getValue(key2, APP_GROUP), "value2"); } - @Test - public void testParallelGetValue() throws Exception { - String key = "example.config.name"; - Mockito.when(configService.getConfig(DEFAULT_DATA_ID, DEFAULT_GROUP, TIMEOUT)).thenReturn(YAML_EXAMPLE); - NacosConfigurationLoader loader = PowerMockito.spy(configYaml); - - Thread thread1 = new Thread(() -> loader.getValue(key, DEFAULT_GROUP)); - Thread thread2 = new Thread(() -> loader.getValue(key, DEFAULT_GROUP)); - thread1.start(); - thread2.start(); - thread1.join(); - thread2.join(); - PowerMockito.verifyPrivate(loader, Mockito.times(1)) - .invoke("registerListenerToGroupDataId", DEFAULT_GROUP, DEFAULT_DATA_ID); - } - @Test @SuppressWarnings({"rawtypes", "unchecked"}) public void testGroupDataIdCaches() throws NacosException, IllegalAccessException {