Skip to content

Commit 394d36f

Browse files
authored
updated gencodec version to v0.1.1 (#4948)
* updated gencodec version to v0.1.1 * test: improve error messages for unexpected stream sizes in request manager tests
1 parent c2d0f2f commit 394d36f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ install:
4040
# - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1
4141
- make go-get
4242
- go install golang.org/x/tools/cmd/[email protected]
43-
- go install github.com/fjl/[email protected].0
43+
- go install github.com/fjl/[email protected].1
4444
- echo "[WARN] - workaround for the GOPATH:"
4545
# sometimes Travis decides to respect GOPATH and creates a symlink, thus we have || true for such cases
4646
- rm $GOPATH/src/github.com/harmony-one/harmony || true;

p2p/stream/common/requestmanager/requestmanager_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,11 @@ func TestRequestManager_RemoveStream(t *testing.T) {
142142
t.Errorf("unexpected error: %v", errors.New("stream removed when doing request"))
143143
}
144144

145-
if ts.rm.streams.Length() != 2 || ts.rm.available.Length() != 2 {
146-
t.Errorf("unexpected stream size")
145+
if l := ts.rm.streams.Length(); l != 2 {
146+
t.Errorf("unexpected stream size, expected 2, got %d", l)
147+
}
148+
if l := ts.rm.available.Length(); l != 2 {
149+
t.Errorf("unexpected stream size, expected 2, got %d", l)
147150
}
148151
}
149152

0 commit comments

Comments
 (0)