types cleanup
This commit is contained in:
10
tcp_test.go
10
tcp_test.go
@@ -21,11 +21,11 @@ func TestTcpHelpers(t *testing.T) {
|
||||
messageData = string(data)
|
||||
return nil
|
||||
})
|
||||
server.HandleCall(2, func(data []byte) (uint32, []byte, error) {
|
||||
server.HandleCall(2, func(data []byte) (PoolMessage, []byte, error) {
|
||||
log.Printf("Received call: %s\n", string(data))
|
||||
return 3, []byte("Hello, client!"), nil
|
||||
})
|
||||
server.HandleCall(Ping, func(data []byte) (uint32, []byte, error) {
|
||||
server.HandleCall(Ping, func(data []byte) (PoolMessage, []byte, error) {
|
||||
return Pong, nil, nil
|
||||
})
|
||||
|
||||
@@ -34,6 +34,12 @@ func TestTcpHelpers(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("Error calling: %v\n", err)
|
||||
}
|
||||
for i := 0; i < 100; i++ {
|
||||
_, err = client.Call(Ping, Pong, nil)
|
||||
if err != nil {
|
||||
t.Errorf("Error calling: %v\n", err)
|
||||
}
|
||||
}
|
||||
_, err = client.Call(Ping, Pong, nil)
|
||||
if err != nil {
|
||||
t.Errorf("Error calling: %v\n", err)
|
||||
|
||||
Reference in New Issue
Block a user