@ -40,11 +40,11 @@ func TestClientRequest(t *testing.T) {
client := DialInProc ( server )
defer client . Close ( )
var resp Result
if err := client . Call ( & resp , "test_echo" , "hello" , 10 , & Args { "world" } ) ; err != nil {
var resp echo Result
if err := client . Call ( & resp , "test_echo" , "hello" , 10 , & echo Args{ "world" } ) ; err != nil {
t . Fatal ( err )
}
if ! reflect . DeepEqual ( resp , Result { "hello" , 10 , & Args { "world" } } ) {
if ! reflect . DeepEqual ( resp , echo Result{ "hello" , 10 , & echo Args{ "world" } } ) {
t . Errorf ( "incorrect result %#v" , resp )
}
}
@ -58,13 +58,13 @@ func TestClientBatchRequest(t *testing.T) {
batch := [ ] BatchElem {
{
Method : "test_echo" ,
Args : [ ] interface { } { "hello" , 10 , & Args { "world" } } ,
Result : new ( Result ) ,
Args : [ ] interface { } { "hello" , 10 , & echo Args{ "world" } } ,
Result : new ( echo Result) ,
} ,
{
Method : "test_echo" ,
Args : [ ] interface { } { "hello2" , 11 , & Args { "world" } } ,
Result : new ( Result ) ,
Args : [ ] interface { } { "hello2" , 11 , & echo Args{ "world" } } ,
Result : new ( echo Result) ,
} ,
{
Method : "no_such_method" ,
@ -78,13 +78,13 @@ func TestClientBatchRequest(t *testing.T) {
wantResult := [ ] BatchElem {
{
Method : "test_echo" ,
Args : [ ] interface { } { "hello" , 10 , & Args { "world" } } ,
Result : & Result { "hello" , 10 , & Args { "world" } } ,
Args : [ ] interface { } { "hello" , 10 , & echo Args{ "world" } } ,
Result : & echo Result{ "hello" , 10 , & echo Args{ "world" } } ,
} ,
{
Method : "test_echo" ,
Args : [ ] interface { } { "hello2" , 11 , & Args { "world" } } ,
Result : & Result { "hello2" , 11 , & Args { "world" } } ,
Args : [ ] interface { } { "hello2" , 11 , & echo Args{ "world" } } ,
Result : & echo Result{ "hello2" , 11 , & echo Args{ "world" } } ,
} ,
{
Method : "no_such_method" ,
@ -104,7 +104,7 @@ func TestClientNotify(t *testing.T) {
client := DialInProc ( server )
defer client . Close ( )
if err := client . Notify ( context . Background ( ) , "test_echo" , "hello" , 10 , & Args { "world" } ) ; err != nil {
if err := client . Notify ( context . Background ( ) , "test_echo" , "hello" , 10 , & echo Args{ "world" } ) ; err != nil {
t . Fatal ( err )
}
}
@ -393,9 +393,9 @@ func TestClientHTTP(t *testing.T) {
// Launch concurrent requests.
var (
results = make ( [ ] Result , 100 )
results = make ( [ ] echo Result, 100 )
errc = make ( chan error )
wantResult = Result { "a" , 1 , new ( Args ) }
wantResult = echo Result{ "a" , 1 , new ( echo Args) }
)
defer client . Close ( )
for i := range results {
@ -450,7 +450,7 @@ func TestClientReconnect(t *testing.T) {
}
// Perform a call. This should work because the server is up.
var resp Result
var resp echo Result
if err := client . CallContext ( ctx , & resp , "test_echo" , "" , 1 , nil ) ; err != nil {
t . Fatal ( err )
}
@ -478,7 +478,7 @@ func TestClientReconnect(t *testing.T) {
for i := 0 ; i < cap ( errors ) ; i ++ {
go func ( ) {
<- start
var resp Result
var resp echo Result
errors <- client . CallContext ( ctx , & resp , "test_echo" , "" , 3 , nil )
} ( )
}