From 576bd0f133bc8e51e07bc179e04fe4b3d7b342fd Mon Sep 17 00:00:00 2001 From: lepdou Date: Mon, 14 Nov 2022 11:51:27 +0800 Subject: [PATCH] upgrade protobuf-java.version to 3.21.7 (#715) --- CHANGELOG.md | 1 + .../polaris/discovery/PolarisDiscoveryClientTest.java | 9 +++------ spring-cloud-tencent-dependencies/pom.xml | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a0431cd..5130bf6f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - [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: remote deprecated method in test](https://github.com/Tencent/spring-cloud-tencent/pull/706) +- [upgrade protobuf-java.version to 3.21.7](https://github.com/Tencent/spring-cloud-tencent/pull/715) - [docs:update README.](https://github.com/Tencent/spring-cloud-tencent/pull/718) - [Fix:fix javadoc.](https://github.com/Tencent/spring-cloud-tencent/pull/721) - [Code optimization & correct comment](https://github.com/Tencent/spring-cloud-tencent/pull/722) diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryClientTest.java b/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryClientTest.java index 41da53413..bfd67879c 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryClientTest.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryClientTest.java @@ -32,7 +32,6 @@ 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.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -63,14 +62,12 @@ public class PolarisDiscoveryClientTest { @Test public void testGetServices() { - -// when(polarisServiceDiscovery.getServices()).thenReturn(singletonList(SERVICE_PROVIDER)); - doReturn(singletonList(SERVICE_PROVIDER)).when(polarisServiceDiscovery).getServices(); + when(polarisServiceDiscovery.getServices()).thenReturn(singletonList(SERVICE_PROVIDER)); List services = client.getServices(); - assertThat(services).contains(SERVICE_PROVIDER).size().isEqualTo(1); - + assertThat(services).size().isEqualTo(1); + assertThat(services.contains(SERVICE_PROVIDER)).isTrue(); } @Test diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index 3c89b07cf..b7814c71d 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -78,7 +78,7 @@ 1.2.11 4.5.1 1.12.10 - 3.16.1 + 3.21.7 1.69 2.0.1