-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
avoid dup refresh for registry config #3135
Merged
chickenlj
merged 4 commits into
apache:2.7.0-release
from
beiwei30:registry-refresh-redo
Jan 6, 2019
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5da7f37
avoid dup refresh for registry config
beiwei30 4e3380f
fix unit test
laoqie 633f66e
fix unit test, org.apache.dubbo.config.AbstractInterfaceConfig#conver…
beiwei30 9c2b8b6
should not give RegistryConfig a default value 'RegistryConfig.NO_AVA…
chickenlj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,8 @@ public void checkApplication2() throws Exception { | |
public void testLoadRegistries() throws Exception { | ||
System.setProperty("dubbo.registry.address", "addr1"); | ||
InterfaceConfig interfaceConfig = new InterfaceConfig(); | ||
// FIXME: now we need to check first, then load | ||
interfaceConfig.checkRegistry(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should give |
||
List<URL> urls = interfaceConfig.loadRegistries(true); | ||
TestCase.assertEquals(1, urls.size()); | ||
URL url = urls.get(0); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can give RegistryConfig a default value
RegistryConfig.NO_AVAILABLE
, instead we should leave it empty. We will try torefresh
this RegistryConfig later, if the user fails to set the right item for RegistryConfig, it will receive an Exception then when checkingisValid
. But if we give it this default value, it will always passisValid
and does register URL to Registry Center which can be unexpected behaviour.