add unittests and bug fix

This commit is contained in:
hdt3213
2021-05-05 20:51:53 +08:00
parent f1ab47bd83
commit 18d2cbb29b
30 changed files with 704 additions and 446 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/hdt3213/godis/tcp"
"net"
"testing"
"time"
)
func TestListenAndServe(t *testing.T) {
@@ -39,4 +40,5 @@ func TestListenAndServe(t *testing.T) {
return
}
closeChan <- struct{}{}
time.Sleep(time.Second)
}