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

Upgrade nacos-sdk-go version to v1.0.3 #981

Merged
merged 4 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Merge branch 'develop' into develop
  • Loading branch information
AlexStocks authored Jan 6, 2021
commit 85a21e8bd4f19b1470fb3b5add5d9f223cbee996
5 changes: 2 additions & 3 deletions config_center/zookeeper/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicC
func TestGetConfig(t *testing.T) {
ts, reg := initZkData("dubbo", t)
defer func() {
if err := ts.Stop(); err != nil {
t.Errorf("ts.Stop() = error: %v", err)
}
err := ts.Stop()
assert.NoError(t, err)
}()
configs, err := reg.GetProperties(dubboPropertyFileName, config_center.WithGroup("dubbo"))
assert.NoError(t, err)
Expand Down
17 changes: 6 additions & 11 deletions protocol/dubbo/hessian2/hessian_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,34 +220,29 @@ func packRequest(service Service, header DubboHeader, req interface{}) ([]byte,
// body
//////////////////////////////////////////
if hb {
if err := encoder.Encode(nil); err != nil {
logger.Warnf("Encode(nil) = error: %v", err)
}
_ = encoder.Encode(nil)
goto END
}

// dubbo version + path + version + method
if err := encoder.Encode(DEFAULT_DUBBO_PROTOCOL_VERSION); err != nil {
if err = encoder.Encode(DEFAULT_DUBBO_PROTOCOL_VERSION); err != nil {
logger.Warnf("Encode(DEFAULT_DUBBO_PROTOCOL_VERSION) = error: %v", err)
}
if err := encoder.Encode(service.Path); err != nil {
if err = encoder.Encode(service.Path); err != nil {
logger.Warnf("Encode(service.Path) = error: %v", err)
}
if err := encoder.Encode(service.Version); err != nil {
if err = encoder.Encode(service.Version); err != nil {
logger.Warnf("Encode(service.Version) = error: %v", err)
}
if err := encoder.Encode(service.Method); err != nil {
if err = encoder.Encode(service.Method); err != nil {
logger.Warnf("Encode(service.Method) = error: %v", err)
}

// args = args type list + args value list
if types, err = getArgsTypeList(args); err != nil {
return nil, perrors.Wrapf(err, " PackRequest(args:%+v)", args)
}
if err := encoder.Encode(types); err != nil {
logger.Warnf("Encode(types:%v) = error: %v", types, err)
}

_ = encoder.Encode(types)
for _, v := range args {
_ = encoder.Encode(v)
}
Expand Down
4 changes: 2 additions & 2 deletions registry/file/service_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestNewFileSystemServiceDiscoveryAndDestroy(t *testing.T) {
serviceDiscovery, err := newFileSystemServiceDiscovery(testName)
assert.NoError(t, err)
assert.NotNil(t, serviceDiscovery)
defer func () {
defer func() {
err = serviceDiscovery.Destroy()
assert.Nil(t, err)
}()
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestCURDFileSystemServiceDiscovery(t *testing.T) {

err = serviceDiscovery.Register(r1)
assert.NoError(t, err)
defer func () {
defer func() {
err = serviceDiscovery.Destroy()
assert.NoError(t, err)
}()
Expand Down
8 changes: 4 additions & 4 deletions remoting/zookeeper/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestCreate(t *testing.T) {
ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second)
assert.NoError(t, err)
defer func() {
err := ts.Stop()
_ = ts.Stop()
assert.Nil(t, err)
}()
err = z.Create("test1/test2/test3/test4")
Expand All @@ -110,7 +110,7 @@ func TestCreateDelete(t *testing.T) {
ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second)
assert.NoError(t, err)
defer func() {
err := ts.Stop()
_ = ts.Stop()
assert.Nil(t, err)
}()

Expand All @@ -127,7 +127,7 @@ func TestRegisterTemp(t *testing.T) {
ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second)
assert.NoError(t, err)
defer func() {
err := ts.Stop()
_ = ts.Stop()
assert.Nil(t, err)
}()
err = z.Create("/test1/test2/test3")
Expand All @@ -144,7 +144,7 @@ func TestRegisterTempSeq(t *testing.T) {
ts, z, event, err := NewMockZookeeperClient("test", 15*time.Second)
assert.NoError(t, err)
defer func() {
err := ts.Stop()
_ = ts.Stop()
assert.Nil(t, err)
}()
err = z.Create("/test1/test2/test3")
Expand Down
2 changes: 1 addition & 1 deletion remoting/zookeeper/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestListener(t *testing.T) {
`
var wait sync.WaitGroup
ts, client, event := initZkData(t)
defer func () {
defer func() {
if err := ts.Stop(); err != nil {
t.Errorf("ts.Stop() = error: %v", err)
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.