types cleanup
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 28s
Build and Publish / BuildAndDeploy (push) Successful in 2m22s

This commit is contained in:
matst80
2024-11-12 18:17:43 +01:00
parent 3f8cdec9af
commit 7e0f070637
11 changed files with 75 additions and 73 deletions

View File

@@ -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)