parent
b49a28cbda
commit
e67ee92244
@ -0,0 +1,18 @@ |
||||
package message |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
const ( |
||||
testIP = "127.0.0.1" |
||||
) |
||||
|
||||
func TestClient(t *testing.T) { |
||||
s := NewServer() |
||||
s.Start(testIP, "") |
||||
|
||||
client := NewClient(testIP) |
||||
client.Process(&Message{}) |
||||
s.Stop() |
||||
} |
@ -0,0 +1,13 @@ |
||||
package message |
||||
|
||||
import ( |
||||
"testing" |
||||
"time" |
||||
) |
||||
|
||||
func TestServerStart(t *testing.T) { |
||||
s := NewServer() |
||||
s.Start("127.0.0.1", "") |
||||
time.Sleep(time.Second) |
||||
s.Stop() |
||||
} |
Loading…
Reference in new issue