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