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

fix #750. registry center notify with complete address list #758

Merged
merged 24 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3053a22
fix #750. 1.fix empty ServiceEvent, we should clear all invokers 2.w…
cvictory Sep 16, 2020
fa94763
add test for clear all address
cvictory Sep 16, 2020
c3aac14
fix nacos test
cvictory Sep 16, 2020
2a6c0a1
fix nacos test
cvictory Sep 16, 2020
94496c5
fix review issue: add constraint of Action value of ServiceEvent in N…
cvictory Sep 23, 2020
eb1b730
Merge branch 'develop' of github.com:apache/dubbo-go into notify_all
cvictory Sep 25, 2020
6053327
fix #750. 1.fix unit test
cvictory Sep 25, 2020
b90bb44
Merge branch 'develop' of github.com:apache/dubbo-go into notify_all
cvictory Sep 27, 2020
3389b38
fix: if the registry center notify address list, it cannot remove inv…
cvictory Sep 27, 2020
634e8d2
enhance the refresh func
cvictory Oct 13, 2020
45c926b
remove doc
cvictory Oct 13, 2020
5f31e3a
enhance the refresh func
cvictory Oct 13, 2020
0c94049
Merge branch 'develop' of github.com:apache/dubbo-go into notify_all
cvictory Oct 14, 2020
d5ffb62
add some debug log
cvictory Oct 18, 2020
2757a1a
use goroutine to destroy invoker
cvictory Nov 13, 2020
51ee140
Merge branch 'develop' of github.com:apache/dubbo-go into notify_all
cvictory Nov 13, 2020
60f53ab
fix merge issue and optimize some invalid usage
cvictory Dec 9, 2020
f4d5df2
fix log error
cvictory Dec 9, 2020
068505d
refactor some code
cvictory Dec 9, 2020
af608d8
trigger init router for first call
zouyx Dec 10, 2020
a5bd416
Revert "trigger init router for first call"
zouyx Dec 11, 2020
5ffcdfe
fix review issue
cvictory Dec 14, 2020
a136af5
Merge branch 'develop' of github.com:apache/dubbo-go into notify_all
cvictory Dec 14, 2020
0cb6305
Merge branch 'notify_all' of github.com:cvictory/dubbo-go into notify…
cvictory Dec 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions metadata/report/nacos/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package nacos

import (
"encoding/json"
"net/http"
"strconv"
"testing"
)
Expand All @@ -36,6 +37,9 @@ import (
)

func TestNacosMetadataReport_CRUD(t *testing.T) {
if _, err := http.Get("http://console.nacos.io/nacos/"); err != nil {
return
}
rpt := newTestReport()
assert.NotNil(t, rpt)

Expand Down
10 changes: 10 additions & 0 deletions registry/nacos/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package nacos

import (
"encoding/json"
"net/http"
"net/url"
"strconv"
"testing"
Expand All @@ -35,6 +36,9 @@ import (
)

func TestNacosRegistry_Register(t *testing.T) {
if _, err := http.Get("http://console.nacos.io/nacos/"); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe u'd better encapsulate a func to delete duplicate codes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return
}
regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)))
urlMap := url.Values{}
urlMap.Set(constant.GROUP_KEY, "guangzhou-idc")
Expand Down Expand Up @@ -64,6 +68,9 @@ func TestNacosRegistry_Register(t *testing.T) {
}

func TestNacosRegistry_Subscribe(t *testing.T) {
if _, err := http.Get("http://console.nacos.io/nacos/"); err != nil {
return
}
regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)))
urlMap := url.Values{}
urlMap.Set(constant.GROUP_KEY, "guangzhou-idc")
Expand Down Expand Up @@ -102,6 +109,9 @@ func TestNacosRegistry_Subscribe(t *testing.T) {
}

func TestNacosRegistry_Subscribe_del(t *testing.T) {
if _, err := http.Get("http://console.nacos.io/nacos/"); err != nil {
return
}
regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)))
urlMap := url.Values{}
urlMap.Set(constant.GROUP_KEY, "guangzhou-idc")
Expand Down
4 changes: 4 additions & 0 deletions registry/nacos/service_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package nacos

import (
"math/rand"
"net/http"
"strconv"
"testing"
"time"
Expand Down Expand Up @@ -81,6 +82,9 @@ func TestNacosServiceDiscovery_Destroy(t *testing.T) {
}

func TestNacosServiceDiscovery_CRUD(t *testing.T) {
if _, err := http.Get("http://console.nacos.io/nacos/"); err != nil {
return
}
prepareData()
extension.SetEventDispatcher("mock", func() observer.EventDispatcher {
return &dispatcher.MockEventDispatcher{}
Expand Down