tianxiaoliang commented on a change in pull request #1077:
URL:
https://github.com/apache/servicecomb-service-center/pull/1077#discussion_r660228943
##########
File path: datasource/cache/ms_cache.go
##########
@@ -21,17 +21,18 @@ import (
"context"
"strings"
- "github.com/go-chassis/cari/discovery"
-
"github.com/apache/servicecomb-service-center/datasource/mongo/client/model"
"github.com/apache/servicecomb-service-center/datasource/mongo/sd"
"github.com/apache/servicecomb-service-center/pkg/util"
+ "github.com/go-chassis/cari/discovery"
)
const (
Provider = "p"
+ Split = "/"
Review comment:
能不能抽取这些常量,和etcd共用
##########
File path: datasource/mongo/sd/instancec_test.go
##########
@@ -71,17 +71,17 @@ func TestInstCacheBasicFunc(t *testing.T) {
assert.Equal(t, instanceCache.cache.Size(), 1)
assert.Nil(t, instanceCache.cache.Get("id_not_exist"))
assert.Equal(t, inst1.Instance.InstanceId,
instanceCache.cache.Get("id1").(model.Instance).Instance.InstanceId)
- assert.Len(t, instanceCache.cache.GetValue("svcid"), 1)
+ assert.Len(t,
instanceCache.cache.GetValue("default/default/svcid"), 1)
Review comment:
增加下test case 验证增删改service后缓存的正确性
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]