테스트 함수 수정
This commit is contained in:
@ -2,6 +2,7 @@ package rpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/rand"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -20,12 +21,12 @@ func (tr *testReceiver) TargetExists(tid primitive.ObjectID) bool {
|
||||
|
||||
func (tr *testReceiver) TestFunc(a string, b string, c int) {
|
||||
target := primitive.NewObjectID()
|
||||
target[0] = 0
|
||||
target[0] = byte(rand.Intn(2) * 20)
|
||||
if CallOrGo(tr, target, a, b) != ErrCanExecuteHere {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Println(" ", a, b)
|
||||
logger.Println(" ", a, b, target[0])
|
||||
}
|
||||
|
||||
func TestRpc(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user