Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the scope of the spi extension #8600

Merged
merged 3 commits into from
Aug 31, 2021

Conversation

CrazyHZM
Copy link
Member

What is the purpose of the change

Adjust the scope of the spi extension used for testing.

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2021

Codecov Report

Merging #8600 (3889af2) into 3.0 (17ba017) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.0    #8600      +/-   ##
============================================
+ Coverage     62.94%   62.97%   +0.03%     
  Complexity      313      313              
============================================
  Files          1117     1117              
  Lines         46811    46811              
  Branches       7046     7046              
============================================
+ Hits          29465    29481      +16     
+ Misses        14057    14042      -15     
+ Partials       3289     3288       -1     
Impacted Files Coverage Δ
...rg/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java 63.39% <0.00%> (-3.58%) ⬇️
...apache/dubbo/registry/ListenerRegistryWrapper.java 55.07% <0.00%> (-2.90%) ⬇️
...stry/client/ServiceDiscoveryRegistryDirectory.java 47.36% <0.00%> (+0.95%) ⬆️
...ting/zookeeper/curator/CuratorZookeeperClient.java 71.92% <0.00%> (+0.98%) ⬆️
...exchange/support/header/HeaderExchangeHandler.java 65.48% <0.00%> (+1.76%) ⬆️
...a/org/apache/dubbo/monitor/dubbo/DubboMonitor.java 88.57% <0.00%> (+1.90%) ⬆️
.../dubbo/remoting/transport/netty4/NettyChannel.java 66.33% <0.00%> (+1.98%) ⬆️
...org/apache/dubbo/rpc/protocol/AbstractInvoker.java 68.46% <0.00%> (+2.70%) ⬆️
.../apache/dubbo/remoting/transport/AbstractPeer.java 69.56% <0.00%> (+4.34%) ⬆️
...ng/transport/dispatcher/all/AllChannelHandler.java 96.55% <0.00%> (+13.79%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17ba017...3889af2. Read the comment docs.

Copy link
Member

@pinxiong pinxiong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! I think we also need to remove the SPI config in resources/META-INF/services/*.

instance.getPort())));
instance.getPort()));
Map<String, String> parameters = new HashMap<>();
parameters.put("registry.listeners", "multipleConfigCenterServiceDiscoveryRegistry");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better use the constant named SPI_NAME instead

@@ -25,15 +25,15 @@
import org.apache.dubbo.registry.client.ServiceDiscoveryRegistry;
import org.apache.dubbo.registry.client.metadata.store.InMemoryWritableMetadataService;

@Activate
@Activate(value = "multipleConfigCenterServiceDiscoveryRegistry")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

RegistryConfig registryConfig = new RegistryConfig(String.format("%s://%s:%s",
instance.getType(),
instance.getHostname(),
instance.getPort()));
Map<String, String> parameters = new HashMap<>();
parameters.put("registry.protocol.listener", "singleConfigCenterExportProvider");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

@@ -27,7 +27,7 @@
/**
* The {@link RegistryProtocolListener} for {@link SingleRegistryCenterExportProviderService}
*/
@Activate(order = 100)
@Activate(order = 100, value = "singleConfigCenterExportProvider")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

# Conflicts:
#	dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/multiple/servicediscoveryregistry/MultipleRegistryCenterServiceDiscoveryRegistryRegistryServiceListener.java
@CrazyHZM CrazyHZM merged commit a957fc0 into apache:3.0 Aug 31, 2021
@CrazyHZM CrazyHZM deleted the 3.0_feature/change_test_spi_scope branch August 31, 2021 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants