You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "YoWuwuuuw (via GitHub)" <gi...@apache.org> on 2025/05/19 07:37:58 UTC
[PR] optimize: Add some checks to RegistryFactory [incubator-seata]
YoWuwuuuw opened a new pull request, #7345:
URL: https://github.com/apache/incubator-seata/pull/7345
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Please make sure you have read and understood the contributing guidelines -->
- [ ] I have registered the PR [changes](../changes).
### Ⅰ. Describe what this PR did
1. Increase the MultiRegistryFactory check for repeated registryType
2. Increase the inspection of RegistryFactory to air registryTypeName(align MultiRegistryFactory)
### Ⅱ. Does this pull request fix one issue?
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
https://github.com/apache/incubator-seata/discussions/7342
### Ⅲ. Why don't you add test cases (unit test/integration test)?
Covers two factory
### Ⅳ. Describe how to verify it
### Ⅴ. Special notes for reviews
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2103685884
##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/MultiRegistryFactory.java:
##########
@@ -48,25 +47,33 @@ public static List<RegistryService> getInstances() {
private static List<RegistryService> buildRegistryServices() {
List<RegistryService> registryServices = new ArrayList<>();
- String registryTypeNamesStr =
- ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(ConfigurationKeys.FILE_ROOT_REGISTRY
- + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+ String registryTypeNamesStr = ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(
+ ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+
if (StringUtils.isBlank(registryTypeNamesStr)) {
registryTypeNamesStr = RegistryType.File.name();
}
String[] registryTypeNames = registryTypeNamesStr.split(Constants.REGISTRY_TYPE_SPLIT_CHAR);
Review Comment:
+1
Also, it would be great to add a test case that covers this scenario.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2097138312
##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/MultiRegistryFactory.java:
##########
@@ -48,26 +49,36 @@ public static List<RegistryService> getInstances() {
private static List<RegistryService> buildRegistryServices() {
List<RegistryService> registryServices = new ArrayList<>();
- String registryTypeNamesStr =
- ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(ConfigurationKeys.FILE_ROOT_REGISTRY
- + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+ Set<String> processedRegistryTypes = new HashSet<>();
+ String registryTypeNamesStr = ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(
+ ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+
if (StringUtils.isBlank(registryTypeNamesStr)) {
registryTypeNamesStr = RegistryType.File.name();
}
String[] registryTypeNames = registryTypeNamesStr.split(Constants.REGISTRY_TYPE_SPLIT_CHAR);
+
if (registryTypeNames.length > 1) {
LOGGER.info("use multi registry center type: {}", registryTypeNamesStr);
}
+
for (String registryTypeName : registryTypeNames) {
RegistryType registryType;
try {
registryType = RegistryType.getType(registryTypeName);
} catch (Exception exx) {
throw new NotSupportYetException("not support registry type: " + registryTypeName);
}
+
+ if (processedRegistryTypes.contains(registryType.name())) {
+ LOGGER.warn("The duplicate registration center type '{}' was found in the configuration and has been skipped.", registryType.name());
+ continue;
Review Comment:
I saw a test that verifies a method was called once by checking if `instances.size()` equals 1.
How about also adding a test to verify that the corresponding log message is properly output?
What do you think?
##########
discovery/seata-discovery-core/src/test/java/org/apache/seata/discovery/registry/RegistryFactoryTest.java:
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.discovery.registry;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.apache.seata.common.ConfigurationKeys;
+import org.apache.seata.common.exception.NotSupportYetException;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+/**
+ * The type Registry factory test.
+ */
+public class RegistryFactoryTest {
+
+ private static final String REGISTRY_TYPE_KEY =
+ ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE;
+
+ @AfterEach
+ public void tearDown() {
+ System.clearProperty(REGISTRY_TYPE_KEY);
+ }
+
+ /**
+ * Test getInstance with default config.
+ */
+ @Test
+ public void testGetInstanceWithDefaultConfig() {
+ System.setProperty(REGISTRY_TYPE_KEY, RegistryType.File.name());
+
+ RegistryService instance = RegistryFactory.getInstance();
+ Assertions.assertNotNull(instance);
+ }
+
+ /**
+ * Test buildRegistryService with invalid registry type.
+ */
+ @Test
+ public void testGetInstanceOfInvalidRegistryType() {
+ System.setProperty(REGISTRY_TYPE_KEY, "InvalidRegistryType");
+
+ Assertions.assertThrows(NotSupportYetException.class, RegistryFactoryTest::invokeBuildRegistryService);
+ }
+
+ /**
+ * Test buildRegistryService with blank registry type.
+ */
+ @Test
+ public void testGetInstancesWithBlankRegistryType() throws Throwable {
+ System.setProperty(REGISTRY_TYPE_KEY, "");
+
+ RegistryService instance = invokeBuildRegistryService();
+ Assertions.assertEquals(instance.getClass(), FileRegistryServiceImpl.class);
+ }
+
+ /**
+ * Use reflection to call the buildRegistryServices method
Review Comment:
It looks like the comment should refer to `buildRegistryService` instead of `buildRegistryServices`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YoWuwuuuw (via GitHub)" <gi...@apache.org>.
YoWuwuuuw commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2097487243
##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/MultiRegistryFactory.java:
##########
@@ -48,26 +49,36 @@ public static List<RegistryService> getInstances() {
private static List<RegistryService> buildRegistryServices() {
List<RegistryService> registryServices = new ArrayList<>();
- String registryTypeNamesStr =
- ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(ConfigurationKeys.FILE_ROOT_REGISTRY
- + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+ Set<String> processedRegistryTypes = new HashSet<>();
+ String registryTypeNamesStr = ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(
+ ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+
if (StringUtils.isBlank(registryTypeNamesStr)) {
registryTypeNamesStr = RegistryType.File.name();
}
String[] registryTypeNames = registryTypeNamesStr.split(Constants.REGISTRY_TYPE_SPLIT_CHAR);
+
if (registryTypeNames.length > 1) {
LOGGER.info("use multi registry center type: {}", registryTypeNamesStr);
}
+
for (String registryTypeName : registryTypeNames) {
RegistryType registryType;
try {
registryType = RegistryType.getType(registryTypeName);
} catch (Exception exx) {
throw new NotSupportYetException("not support registry type: " + registryTypeName);
}
+
+ if (processedRegistryTypes.contains(registryType.name())) {
+ LOGGER.warn("The duplicate registration center type '{}' was found in the configuration and has been skipped.", registryType.name());
+ continue;
Review Comment:
Ok, learned and used the method you wrote before in #7199 (it's awesome)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes merged PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2103637697
##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/MultiRegistryFactory.java:
##########
@@ -48,25 +47,33 @@ public static List<RegistryService> getInstances() {
private static List<RegistryService> buildRegistryServices() {
List<RegistryService> registryServices = new ArrayList<>();
- String registryTypeNamesStr =
- ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(ConfigurationKeys.FILE_ROOT_REGISTRY
- + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+ String registryTypeNamesStr = ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(
+ ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+
if (StringUtils.isBlank(registryTypeNamesStr)) {
registryTypeNamesStr = RegistryType.File.name();
}
String[] registryTypeNames = registryTypeNamesStr.split(Constants.REGISTRY_TYPE_SPLIT_CHAR);
Review Comment:
Why not convert this directly to a TreeSet? This would allow for case-insensitivity and also handle deduplication
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2103731407
##########
discovery/seata-discovery-core/src/test/java/org/apache/seata/discovery/registry/MultiRegistryFactoryTest.java:
##########
Review Comment:
Since it’s been changed to a `TreeSet`, it might be good to add a few more test cases
1. When the same `RegistryType` is provided with different casing (e.g., `File`, `FILE`), does it recognize them as the same?
- This could be verified by **checking the size of registerTypeNames and the corresponding log output.**
2. When more than one RegistryType is provided, does **the log output as expected**?
3. When a value not defined in RegistryType is passed, is the appropriate exception thrown?
##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/RegistryFactory.java:
##########
@@ -45,8 +45,12 @@ public static RegistryService getInstance() {
private static RegistryService buildRegistryService() {
RegistryType registryType;
String registryTypeName = ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(
- ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR
- + ConfigurationKeys.FILE_ROOT_TYPE);
+ ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+
+ if (StringUtils.isBlank(registryTypeName)) {
+ registryTypeName = RegistryType.File.name();
+ }
+
LOGGER.info("use registry center type: {}", registryTypeName);
try {
Review Comment:
This try-catch block could be removed, as it simply catches the exception and rethrows it without adding any additional handling.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2103731407
##########
discovery/seata-discovery-core/src/test/java/org/apache/seata/discovery/registry/MultiRegistryFactoryTest.java:
##########
Review Comment:
Since it’s been changed to a `TreeSet`, it might be good to add a few more test cases
1. When the same `RegistryType` is provided with different casing (e.g., `File`, `FILE`), does it recognize them as the same?
- This could be verified by checking that no log is printed.
2. When more than one RegistryType is provided, does **the log output as expected**?
3. When a value not defined in RegistryType is passed, is the appropriate exception thrown? (After removing the try-catch block, this test should be added.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YoWuwuuuw (via GitHub)" <gi...@apache.org>.
YoWuwuuuw commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2097487243
##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/MultiRegistryFactory.java:
##########
@@ -48,26 +49,36 @@ public static List<RegistryService> getInstances() {
private static List<RegistryService> buildRegistryServices() {
List<RegistryService> registryServices = new ArrayList<>();
- String registryTypeNamesStr =
- ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(ConfigurationKeys.FILE_ROOT_REGISTRY
- + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+ Set<String> processedRegistryTypes = new HashSet<>();
+ String registryTypeNamesStr = ConfigurationFactory.CURRENT_FILE_INSTANCE.getConfig(
+ ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + ConfigurationKeys.FILE_ROOT_TYPE);
+
if (StringUtils.isBlank(registryTypeNamesStr)) {
registryTypeNamesStr = RegistryType.File.name();
}
String[] registryTypeNames = registryTypeNamesStr.split(Constants.REGISTRY_TYPE_SPLIT_CHAR);
+
if (registryTypeNames.length > 1) {
LOGGER.info("use multi registry center type: {}", registryTypeNamesStr);
}
+
for (String registryTypeName : registryTypeNames) {
RegistryType registryType;
try {
registryType = RegistryType.getType(registryTypeName);
} catch (Exception exx) {
throw new NotSupportYetException("not support registry type: " + registryTypeName);
}
+
+ if (processedRegistryTypes.contains(registryType.name())) {
+ LOGGER.warn("The duplicate registration center type '{}' was found in the configuration and has been skipped.", registryType.name());
+ continue;
Review Comment:
Ok, learned and used the method you wrote before in #7315 (it's awesome)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#issuecomment-2904132570
@YoWuwuuuw
I noticed a very minor change was needed, so I opened a PR to your branch.
https://github.com/YoWuwuuuw/incubator-seata/pull/10
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2103731407
##########
discovery/seata-discovery-core/src/test/java/org/apache/seata/discovery/registry/MultiRegistryFactoryTest.java:
##########
Review Comment:
Since it’s been changed to a `TreeSet`, it might be good to add a few more test cases
1. When the same `RegistryType` is provided with different casing (e.g., `File`, `FILE`), does it recognize them as the same?
- This could be verified by checking that no log is printed.
2. When more than one RegistryType is provided, does **the log output as expected**?
3. When a value not defined in RegistryType is passed, is the appropriate exception thrown?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YongGoose (via GitHub)" <gi...@apache.org>.
YongGoose commented on PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#issuecomment-2894002043
@slievrly
Please take a look :)

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "YoWuwuuuw (via GitHub)" <gi...@apache.org>.
YoWuwuuuw commented on code in PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#discussion_r2104034358
##########
discovery/seata-discovery-core/src/test/java/org/apache/seata/discovery/registry/MultiRegistryFactoryTest.java:
##########
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Add some checks to RegistryFactory [incubator-seata]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7345:
URL: https://github.com/apache/incubator-seata/pull/7345#issuecomment-2890041574
## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/7345?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 54.96%. Comparing base [(`3b40167`)](https://app.codecov.io/gh/apache/incubator-seata/commit/3b40167b06aa4bd707ae32bfc5774219e63fcfb0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`01f78c0`)](https://app.codecov.io/gh/apache/incubator-seata/commit/01f78c0ea29ea6242b2612ff5ed8f4b12b869460?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 2.x #7345 +/- ##
============================================
- Coverage 55.79% 54.96% -0.83%
+ Complexity 7476 7399 -77
============================================
Files 1178 1178
Lines 41962 41968 +6
Branches 4923 4925 +2
============================================
- Hits 23413 23069 -344
- Misses 16310 16740 +430
+ Partials 2239 2159 -80
```
| [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/7345?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...seata/discovery/registry/MultiRegistryFactory.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7345?src=pr&el=tree&filepath=discovery%2Fseata-discovery-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fdiscovery%2Fregistry%2FMultiRegistryFactory.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGlzY292ZXJ5L3NlYXRhLWRpc2NvdmVyeS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9kaXNjb3ZlcnkvcmVnaXN0cnkvTXVsdGlSZWdpc3RyeUZhY3RvcnkuamF2YQ==) | `96.00% <100.00%> (+96.00%)` | :arrow_up: |
| [...ache/seata/discovery/registry/RegistryFactory.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7345?src=pr&el=tree&filepath=discovery%2Fseata-discovery-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fdiscovery%2Fregistry%2FRegistryFactory.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGlzY292ZXJ5L3NlYXRhLWRpc2NvdmVyeS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9kaXNjb3ZlcnkvcmVnaXN0cnkvUmVnaXN0cnlGYWN0b3J5LmphdmE=) | `92.30% <100.00%> (+92.30%)` | :arrow_up: |
... and [61 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/7345/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
[](https://app.codecov.io/gh/apache/incubator-seata/pull/7345?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org