fix:fix discovery junit.

pull/725/head
SkyeBeFreeman 3 years ago
parent a13ddc4c01
commit f4a8e3c307

@ -13,3 +13,4 @@
- [Test: remote deprecated method in test](https://github.com/Tencent/spring-cloud-tencent/pull/706)
- [docs:update README.](https://github.com/Tencent/spring-cloud-tencent/pull/718)
- [Code optimization & correct comment](https://github.com/Tencent/spring-cloud-tencent/pull/722)
- [fix:fix discovery junit.](https://github.com/Tencent/spring-cloud-tencent/pull/725)

@ -32,8 +32,7 @@ import static com.tencent.polaris.test.common.Consts.SERVICE_PROVIDER;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.*;
/**
* Test for {@link PolarisDiscoveryClient}.
@ -63,7 +62,8 @@ public class PolarisDiscoveryClientTest {
@Test
public void testGetServices() {
when(polarisServiceDiscovery.getServices()).thenReturn(singletonList(SERVICE_PROVIDER));
// when(polarisServiceDiscovery.getServices()).thenReturn(singletonList(SERVICE_PROVIDER));
doReturn(singletonList(SERVICE_PROVIDER)).when(polarisServiceDiscovery.getServices());
List<String> services = client.getServices();

Loading…
Cancel
Save