Remove deprecated method in test (#706)

pull/718/head
weihubeats 2 years ago committed by GitHub
parent 2b8ef26006
commit ad44516d30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,3 +8,4 @@
- [Code optimize & add junit tests.](https://github.com/Tencent/spring-cloud-tencent/pull/701) - [Code optimize & add junit tests.](https://github.com/Tencent/spring-cloud-tencent/pull/701)
- [Optimize: remote deprecated method](https://github.com/Tencent/spring-cloud-tencent/pull/697) - [Optimize: remote deprecated method](https://github.com/Tencent/spring-cloud-tencent/pull/697)
- [Test:support environment variable metadata test](https://github.com/Tencent/spring-cloud-tencent/pull/698) - [Test:support environment variable metadata test](https://github.com/Tencent/spring-cloud-tencent/pull/698)
- [Test: remote deprecated method in test](https://github.com/Tencent/spring-cloud-tencent/pull/706)

@ -31,7 +31,6 @@ import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner; import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactory;
import org.springframework.cloud.client.loadbalancer.LoadBalancerProperties;
import org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties; import org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties;
import org.springframework.cloud.gateway.filter.ReactiveLoadBalancerClientFilter; import org.springframework.cloud.gateway.filter.ReactiveLoadBalancerClientFilter;
import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory; import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
@ -54,8 +53,6 @@ public class ReactiveLoadBalancerClientFilterBeanPostProcessorTest {
@Mock @Mock
private GatewayLoadBalancerProperties gatewayLoadBalancerProperties; private GatewayLoadBalancerProperties gatewayLoadBalancerProperties;
@Mock @Mock
private LoadBalancerProperties loadBalancerProperties;
@Mock
private StaticMetadataManager staticMetadataManager; private StaticMetadataManager staticMetadataManager;
@Mock @Mock
private RouterRuleLabelResolver routerRuleLabelResolver; private RouterRuleLabelResolver routerRuleLabelResolver;
@ -72,7 +69,7 @@ public class ReactiveLoadBalancerClientFilterBeanPostProcessorTest {
.thenReturn(null); .thenReturn(null);
ReactiveLoadBalancerClientFilter reactiveLoadBalancerClientFilter = new ReactiveLoadBalancerClientFilter( ReactiveLoadBalancerClientFilter reactiveLoadBalancerClientFilter = new ReactiveLoadBalancerClientFilter(
loadBalancerClientFactory, gatewayLoadBalancerProperties, loadBalancerProperties); loadBalancerClientFactory, gatewayLoadBalancerProperties);
ReactiveLoadBalancerClientFilterBeanPostProcessor processor = new ReactiveLoadBalancerClientFilterBeanPostProcessor(); ReactiveLoadBalancerClientFilterBeanPostProcessor processor = new ReactiveLoadBalancerClientFilterBeanPostProcessor();
processor.setBeanFactory(beanFactory); processor.setBeanFactory(beanFactory);

@ -46,7 +46,6 @@ import org.mockito.MockedStatic;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner; import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.cloud.client.loadbalancer.LoadBalancerProperties;
import org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties; import org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties;
import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory; import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
@ -81,8 +80,6 @@ public class PolarisReactiveLoadBalancerClientFilterTest {
@Mock @Mock
private GatewayLoadBalancerProperties gatewayLoadBalancerProperties; private GatewayLoadBalancerProperties gatewayLoadBalancerProperties;
@Mock @Mock
private LoadBalancerProperties loadBalancerProperties;
@Mock
private PolarisContextProperties polarisContextProperties; private PolarisContextProperties polarisContextProperties;
@BeforeClass @BeforeClass

Loading…
Cancel
Save