@@ -40,11 +40,11 @@ func TestClientRequest(t *testing.T) {
4040 client := DialInProc (server )
4141 defer client .Close ()
4242
43- var resp Result
44- if err := client .Call (& resp , "test_echo" , "hello" , 10 , & Args {"world" }); err != nil {
43+ var resp echoResult
44+ if err := client .Call (& resp , "test_echo" , "hello" , 10 , & echoArgs {"world" }); err != nil {
4545 t .Fatal (err )
4646 }
47- if ! reflect .DeepEqual (resp , Result {"hello" , 10 , & Args {"world" }}) {
47+ if ! reflect .DeepEqual (resp , echoResult {"hello" , 10 , & echoArgs {"world" }}) {
4848 t .Errorf ("incorrect result %#v" , resp )
4949 }
5050}
@@ -58,13 +58,13 @@ func TestClientBatchRequest(t *testing.T) {
5858 batch := []BatchElem {
5959 {
6060 Method : "test_echo" ,
61- Args : []interface {}{"hello" , 10 , & Args {"world" }},
62- Result : new (Result ),
61+ Args : []interface {}{"hello" , 10 , & echoArgs {"world" }},
62+ Result : new (echoResult ),
6363 },
6464 {
6565 Method : "test_echo" ,
66- Args : []interface {}{"hello2" , 11 , & Args {"world" }},
67- Result : new (Result ),
66+ Args : []interface {}{"hello2" , 11 , & echoArgs {"world" }},
67+ Result : new (echoResult ),
6868 },
6969 {
7070 Method : "no_such_method" ,
@@ -78,13 +78,13 @@ func TestClientBatchRequest(t *testing.T) {
7878 wantResult := []BatchElem {
7979 {
8080 Method : "test_echo" ,
81- Args : []interface {}{"hello" , 10 , & Args {"world" }},
82- Result : & Result {"hello" , 10 , & Args {"world" }},
81+ Args : []interface {}{"hello" , 10 , & echoArgs {"world" }},
82+ Result : & echoResult {"hello" , 10 , & echoArgs {"world" }},
8383 },
8484 {
8585 Method : "test_echo" ,
86- Args : []interface {}{"hello2" , 11 , & Args {"world" }},
87- Result : & Result {"hello2" , 11 , & Args {"world" }},
86+ Args : []interface {}{"hello2" , 11 , & echoArgs {"world" }},
87+ Result : & echoResult {"hello2" , 11 , & echoArgs {"world" }},
8888 },
8989 {
9090 Method : "no_such_method" ,
@@ -104,7 +104,7 @@ func TestClientNotify(t *testing.T) {
104104 client := DialInProc (server )
105105 defer client .Close ()
106106
107- if err := client .Notify (context .Background (), "test_echo" , "hello" , 10 , & Args {"world" }); err != nil {
107+ if err := client .Notify (context .Background (), "test_echo" , "hello" , 10 , & echoArgs {"world" }); err != nil {
108108 t .Fatal (err )
109109 }
110110}
@@ -393,9 +393,9 @@ func TestClientHTTP(t *testing.T) {
393393
394394 // Launch concurrent requests.
395395 var (
396- results = make ([]Result , 100 )
396+ results = make ([]echoResult , 100 )
397397 errc = make (chan error )
398- wantResult = Result {"a" , 1 , new (Args )}
398+ wantResult = echoResult {"a" , 1 , new (echoArgs )}
399399 )
400400 defer client .Close ()
401401 for i := range results {
@@ -450,7 +450,7 @@ func TestClientReconnect(t *testing.T) {
450450 }
451451
452452 // Perform a call. This should work because the server is up.
453- var resp Result
453+ var resp echoResult
454454 if err := client .CallContext (ctx , & resp , "test_echo" , "" , 1 , nil ); err != nil {
455455 t .Fatal (err )
456456 }
@@ -478,7 +478,7 @@ func TestClientReconnect(t *testing.T) {
478478 for i := 0 ; i < cap (errors ); i ++ {
479479 go func () {
480480 <- start
481- var resp Result
481+ var resp echoResult
482482 errors <- client .CallContext (ctx , & resp , "test_echo" , "" , 3 , nil )
483483 }()
484484 }
0 commit comments