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 {