You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/04/02 08:04:41 UTC

[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #932: unified dep test file

tianxiaoliang commented on a change in pull request #932:
URL: https://github.com/apache/servicecomb-service-center/pull/932#discussion_r606125329



##########
File path: datasource/dep_test.go
##########
@@ -622,18 +625,29 @@ func Test_Get(t *testing.T) {
 }
 
 func DependencyHandle(t *testing.T) {
-	for {
-		assert.NoError(t, deh.Handle())
+	mode := archaius.Get("TEST_MODE")
+	if mode == nil {
+		mode = "etcd"
+	}
+	if mode == "etcd" {
+		for {
+			assert.NoError(t, deh.Handle())
 
-		key := path.GetServiceDependencyQueueRootKey("")
-		resp, err := kv.Store().DependencyQueue().Search(getContext(),
-			client.WithStrKey(key), client.WithPrefix(), client.WithCountOnly())
+			key := path.GetServiceDependencyQueueRootKey("")

Review comment:
       这里UT没有依赖接口,而是依赖了etcd下面的实现,需要解耦




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org