lengyuexuexuan commented on code in PR #1916:
URL:
https://github.com/apache/incubator-pegasus/pull/1916#discussion_r1511022566
##########
go-client/session/meta_session_test.go:
##########
@@ -118,11 +118,28 @@ func TestMetaManager_FirstMetaDead(t *testing.T) {
for i := 0; i < 3; i++ {
call := newMetaCall(mm.currentLeader, mm.metas, func(rpcCtx
context.Context, ms *metaSession) (metaResponse, error) {
return ms.queryConfig(rpcCtx, "temp")
- })
+ }, []string{"0.0.0.0:12345", "0.0.0.0:34603", "0.0.0.0:34602",
"0.0.0.0:34601"})
// This a trick for testing. If metaCall issue to other meta,
not only to the leader, this nil channel will cause panic.
call.backupCh = nil
metaResp, err := call.Run(context.Background())
assert.Nil(t, err)
assert.Equal(t, metaResp.GetErr().Errno, base.ERR_OK.String())
}
}
+
+// This case mocks the case that the server primary meta is not in the client
metalist.
Review Comment:
When onebox starts, the primary meta server is randomized. Therefore, a loop
is used, and only one meta server is passed to the go client each time. This
ensures that redirection is required twice in the loop.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]