You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/09/18 14:41:02 UTC

[dubbo-go-pixiu] branch develop updated: fix: grpc test may fail

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go-pixiu.git


The following commit(s) were added to refs/heads/develop by this push:
     new 915e1b9  fix: grpc test may fail
     new e88f221  Merge pull request #251 from MasterKenway/fix/grpc-sample
915e1b9 is described below

commit 915e1b9d96ec95fbef2c9c1d8420b02abb517b75
Author: MasterKenway <zk...@ikenway.net>
AuthorDate: Sat Sep 18 22:22:53 2021 +0800

    fix: grpc test may fail
---
 samples/http/grpc/server/app/server.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/samples/http/grpc/server/app/server.go b/samples/http/grpc/server/app/server.go
index d1faea1..3e008be 100644
--- a/samples/http/grpc/server/app/server.go
+++ b/samples/http/grpc/server/app/server.go
@@ -48,8 +48,8 @@ type server struct {
 func (s *server) GetUser(ctx context.Context, request *proto.GetUserRequest) (*proto.GetUserResponse, error) {
 	us := make([]*proto.User, 0)
 	if request.GetUserId() == 0 {
-		for _, user := range s.users {
-			us = append(us, user)
+		for i := 1; i <= 2; i++ {
+			us = append(us, s.users[int32(i)])
 		}
 	} else {
 		u, ok := s.users[request.GetUserId()]