test: added unit tests for NacosRegistryServiceImple
Unit tests added for NacosRegistryServiceImplementation
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 54.22%. Comparing base (757bf45) to head (6a7e9d7).
:warning: Report is 145 commits behind head on 2.x.
Additional details and impacted files
@@ Coverage Diff @@
## 2.x #7225 +/- ##
============================================
+ Coverage 54.17% 54.22% +0.04%
- Complexity 7222 7260 +38
============================================
Files 1173 1176 +3
Lines 41796 41927 +131
Branches 4906 4918 +12
============================================
+ Hits 22642 22733 +91
- Misses 17013 17042 +29
- Partials 2141 2152 +11
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Hi @slievrly . Can you take a look? Since these are mock tests, how else would we improve these? The actual functionalities are tightly coupled(Depends on the discovery services) which makes me think these are not good cases for mock tests, since we are mocking the core functionalities.
Please let me know if I'm missing any key points, thanks.
Hi @slievrly . Can you take a look? Since these are mock tests, how else would we improve these? The actual functionalities are tightly coupled(Depends on the discovery services) which makes me think these are not good cases for mock tests, since we are mocking the core functionalities.
Please let me know if I'm missing any key points, thanks.
Some third-party configuration registries themselves provide mock server capabilities. If they don't, then we'll consider launching a registry container in the github action pipeline to do real testing. If that's not possible, we'll consider mock test to simulate the registry's behavior to see if Seata behaves as expected.
https://github.com/apache/incubator-seata/blob/2.x/.github/workflows/build.yml#L38 I don't think mocking is necessary because the Nacos container is already running in the CI environment on Linux. Therefore, we can directly perform the related tests, as long as we add a condition to run only in the Linux environment
Long time no progress, close it.