Skip to content

Commit

Permalink
make error less sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokangwang committed Jun 3, 2020
1 parent d31a067 commit b610fc0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions transport/internet/headers/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"bytes"
"context"
"crypto/rand"
"io"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -247,8 +246,10 @@ func TestConnectionInvPath(t *testing.T) {
totalBytes := 0
for {
n, err := authConn.Read(actualResponse[totalBytes:])
if err != io.EOF {
t.Error("Unexpected Error", err)
if err == nil {
t.Error("Error Expected", err)
} else {
return
}
totalBytes += n
if totalBytes >= len(expectedResponse) || time.Now().After(deadline) {
Expand Down

0 comments on commit b610fc0

Please sign in to comment.