From 5023aac2f4e89213c111aa7210ed9cf71eec7533 Mon Sep 17 00:00:00 2001 From: fishtailfu Date: Tue, 9 Dec 2025 17:53:21 +0800 Subject: [PATCH] fix: add ut. --- .../polaris/extend/nacos/NacosContextPropertiesTest.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/nacos/NacosContextPropertiesTest.java b/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/nacos/NacosContextPropertiesTest.java index 870b9fa9d..ff33f26af 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/nacos/NacosContextPropertiesTest.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/nacos/NacosContextPropertiesTest.java @@ -61,6 +61,7 @@ public class NacosContextPropertiesTest { @Test public void testDefaultInitialization() { + assertThat(nacosContextProperties.isDiscoveryEnabled()).isTrue(); assertThat(nacosContextProperties).isNotNull(); assertThat(nacosContextProperties.getServerAddr()).isEqualTo("127.0.0.1:8848"); assertThat(nacosContextProperties.isRegisterEnabled()).isTrue(); @@ -96,12 +97,6 @@ public class NacosContextPropertiesTest { assertThat(metadata.get(NACOS_CLUSTER_KEY)).isEqualTo(nacosContextProperties.getClusterName()); } - @Test - public void testDiscoveryEnabledProperty() { - // Test that discoveryEnabled is true from spring.cloud.nacos.discovery.enabled - assertThat(nacosContextProperties.isDiscoveryEnabled()).isTrue(); - } - @SpringBootApplication protected static class TestApplication {