diff --git a/cluster/router/condition_router.go b/cluster/router/condition_router.go index efae65ccb34eb8a78e281cfaf7b1fcec79b3d163..ff1537fc71ec0aa5257cd14b49d514f15d86556a 100644 --- a/cluster/router/condition_router.go +++ b/cluster/router/condition_router.go @@ -24,7 +24,7 @@ import ( ) import ( - "github.com/dubbogo/gost/container/gxset" + gxset "github.com/dubbogo/gost/container/set" gxnet "github.com/dubbogo/gost/net" perrors "github.com/pkg/errors" ) diff --git a/common/url.go b/common/url.go index c010298bf58d65b6c2fcfc7859e03b0131bf7f54..e7762355a56837796e0eedc4f67a96d3a851c632 100644 --- a/common/url.go +++ b/common/url.go @@ -31,7 +31,7 @@ import ( ) import ( - "github.com/dubbogo/gost/container/gxset" + gxset "github.com/dubbogo/gost/container/set" "github.com/jinzhu/copier" perrors "github.com/pkg/errors" "github.com/satori/go.uuid" diff --git a/config/graceful_shutdown.go b/config/graceful_shutdown.go index fedb2c15ecdab62d17f0a4e83c45522f1c18acb0..83e2589c7b2869a5822c5e90de1699b3bd27df92 100644 --- a/config/graceful_shutdown.go +++ b/config/graceful_shutdown.go @@ -25,7 +25,7 @@ import ( ) import ( - "github.com/dubbogo/gost/container/gxset" + gxset "github.com/dubbogo/gost/container/set" ) import ( diff --git a/config_center/apollo/impl_test.go b/config_center/apollo/impl_test.go index e898be91ee356180f5967f9dd5a02df0dbcfb311..2a891a212e3d37a0a2a3217b9883d173d6373859 100644 --- a/config_center/apollo/impl_test.go +++ b/config_center/apollo/impl_test.go @@ -21,9 +21,11 @@ import ( "fmt" "net/http" "net/http/httptest" + "os" "strings" "sync" "testing" + "time" ) import ( @@ -171,6 +173,7 @@ func Test_GetConfig(t *testing.T) { mapContent, err := configuration.Parser().Parse(configs) assert.NoError(t, err) assert.Equal(t, "ikurento.com", mapContent["application.organization"]) + deleteMockJson(t) } func Test_GetConfigItem(t *testing.T) { @@ -180,6 +183,7 @@ func Test_GetConfigItem(t *testing.T) { configuration.SetParser(&parser.DefaultConfigurationParser{}) assert.NoError(t, err) assert.Equal(t, "ikurento.com", configs) + deleteMockJson(t) } func initMockApollo(t *testing.T) *apolloConfiguration { @@ -216,6 +220,7 @@ func TestAddListener(t *testing.T) { listener.wg.Wait() assert.Equal(t, "registries.hangzhouzk.username", listener.event) assert.Greater(t, listener.count, 0) + deleteMockJson(t) } func TestRemoveListener(t *testing.T) { @@ -244,6 +249,7 @@ func TestRemoveListener(t *testing.T) { }) assert.Equal(t, listenerCount, 0) assert.Equal(t, listener.count, 0) + deleteMockJson(t) } type apolloDataListener struct { @@ -260,3 +266,10 @@ func (l *apolloDataListener) Process(configType *config_center.ConfigChangeEvent l.count++ l.event = configType.Key } + +func deleteMockJson(t *testing.T) { + //because the file write in another goroutine,so have a break ... + time.Sleep(100 * time.Millisecond) + remove := os.Remove("mockDubbog.properties.json") + t.Log("remove result:", remove) +} diff --git a/config_center/configurator/override.go b/config_center/configurator/override.go index e85b4d3ec9d5e6f9f7163cefce3f328f8dcc225a..8e8fe5cc1ab91eb779a73f85e3a71984f0ba6798 100644 --- a/config_center/configurator/override.go +++ b/config_center/configurator/override.go @@ -21,7 +21,7 @@ import ( ) import ( - "github.com/dubbogo/gost/container/gxset" + gxset "github.com/dubbogo/gost/container/set" gxnet "github.com/dubbogo/gost/net" ) diff --git a/go.mod b/go.mod index 17ac2bc067db22d2199f7d0a34142e8775da3d9f..4d65602d9dc40fc200e140fd4a376534a8ea6a73 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ require ( github.com/Workiva/go-datastructures v1.0.50 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e // indirect - github.com/apache/dubbo-go-hessian2 v1.2.5-0.20191029001541-894e45c9aaaa + github.com/apache/dubbo-go-hessian2 v1.3.1-0.20200106042936-0e1fc43955b2 github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 // indirect github.com/coreos/bbolt v1.3.3 // indirect github.com/coreos/etcd v3.3.13+incompatible @@ -13,7 +13,7 @@ require ( github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect github.com/creasty/defaults v1.3.0 github.com/dubbogo/getty v1.3.1 - github.com/dubbogo/gost v1.3.0 + github.com/dubbogo/gost v1.5.1 github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect github.com/go-errors/errors v1.0.1 // indirect github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect diff --git a/go.sum b/go.sum index 9855250a90f72eca314bf54cd9bea03a619b6a5e..90f64a1f71feb5f4b22be52df90fc4321db41b4a 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e h1:MSuLXx/mveDbpDNhVrcWTMeV4lbYWKcyO4rH+jAxmX0= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/apache/dubbo-go-hessian2 v1.2.5-0.20191029001541-894e45c9aaaa h1:11TO1wiM5bvGAVrmfN5atD8gZqUSPE1TBoIs8sI6Abk= -github.com/apache/dubbo-go-hessian2 v1.2.5-0.20191029001541-894e45c9aaaa/go.mod h1:LWnndnrFXZmJLAzoyNAPNHSIJ1KOHVkTSsHgC3YYWlo= +github.com/apache/dubbo-go-hessian2 v1.3.1-0.20200106042936-0e1fc43955b2 h1:SFqItOYknm1g4iKgjp2GT7aKBtsgejD3hdVq0UnLUv0= +github.com/apache/dubbo-go-hessian2 v1.3.1-0.20200106042936-0e1fc43955b2/go.mod h1:VwEnsOMidkM1usya2uPfGpSLO9XUF//WQcWn3y+jFz8= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -104,10 +104,9 @@ github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dubbogo/getty v1.3.1 h1:9fehwTo/D6+z6/+kADMbhbKeMkP80o/3g+XwV5lFLTY= github.com/dubbogo/getty v1.3.1/go.mod h1:dtLOEb1v6EMHsQNYRWEACiRLmTWB2kJGUAj1aXayPOg= -github.com/dubbogo/gost v1.1.1 h1:JCM7vx5edPIjDA5ovJTuzEEXuw2t7xLyrlgi2mi5jHI= github.com/dubbogo/gost v1.1.1/go.mod h1:R7wZm1DrmrKGr50mBZVcg6C9ekG8aL5hP+sgWcIDwQg= -github.com/dubbogo/gost v1.3.0 h1:n90mIUWCPD69BqW8wJ43NDy0RgNxx02aAG4QJcJ785U= -github.com/dubbogo/gost v1.3.0/go.mod h1:R7wZm1DrmrKGr50mBZVcg6C9ekG8aL5hP+sgWcIDwQg= +github.com/dubbogo/gost v1.5.1 h1:oG5dzaWf1KYynBaBoUIOkgT+YD0niHV6xxI0Odq7hDg= +github.com/dubbogo/gost v1.5.1/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8= github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74 h1:2MIhn2R6oXQbgW5yHfS+d6YqyMfXiu2L55rFZC4UD/M= github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo= github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0 h1:ZoRgc53qJCfSLimXqJDrmBhnt5GChDsExMCK7t48o0Y= @@ -449,6 +448,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/tebeka/strftime v0.1.3 h1:5HQXOqWKYRFfNyBMNVc9z5+QzuBtIXy03psIhtdJYto= github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ= github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9/go.mod h1:RHkNRtSLfOK7qBTHaeSX1D6BNpI3qw7NTxsmNr4RvN8= +github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0= github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= diff --git a/registry/protocol/protocol.go b/registry/protocol/protocol.go index 534a4b945965f332e49ff343557fa20355921454..8655312a4eb508dfe5c910855ba5f3e3aacd666e 100644 --- a/registry/protocol/protocol.go +++ b/registry/protocol/protocol.go @@ -23,7 +23,7 @@ import ( ) import ( - "github.com/dubbogo/gost/container/gxset" + gxset "github.com/dubbogo/gost/container/set" ) import (