Skip to content

Commit

Permalink
add TestReadStreamAfterSessionClose
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Sep 5, 2016
1 parent 5cba51d commit c3c1d44
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,22 @@ func TestWriteAfterClose(t *testing.T) {
}
}

func TestReadStreamAfterSessionClose(t *testing.T) {
cli, err := net.Dial("tcp", "127.0.0.1:19999")
if err != nil {
t.Fatal(err)
}
session, _ := Client(cli, nil)
stream, _ := session.OpenStream()
session.Close()
buf := make([]byte, 10)
if _, err := stream.Read(buf); err != nil {
t.Log(err)
} else {
t.Fatal(err)
}
}

func TestNumStreamAfterClose(t *testing.T) {
cli, err := net.Dial("tcp", "127.0.0.1:19999")
if err != nil {
Expand Down

0 comments on commit c3c1d44

Please sign in to comment.