Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: server/prpc/decoding_test.go

Issue 1637193002: common/prpc, tools/cmd/cproto: prpc client (Closed) Base URL: https://github.com/luci/luci-go@prpc-server
Patch Set: Add some content length tests. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/prpc/decoding.go ('k') | server/prpc/timeout.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/prpc/decoding_test.go
diff --git a/server/prpc/decoding_test.go b/server/prpc/decoding_test.go
index dd4264527b920f925d1b3c8ac7c70649b7307696..0e4311e25570444435baca80d2e409ec27eb243d 100644
--- a/server/prpc/decoding_test.go
+++ b/server/prpc/decoding_test.go
@@ -17,6 +17,7 @@ import (
"google.golang.org/grpc/metadata"
"github.com/luci/luci-go/common/clock/testclock"
+ prpccommon "github.com/luci/luci-go/common/prpc"
. "github.com/luci/luci-go/common/testing/assertions"
. "github.com/smartystreets/goconvey/convey"
@@ -145,12 +146,12 @@ func TestDecoding(t *testing.T) {
}
}
- Convey(headerTimeout, func() {
+ Convey(prpccommon.HeaderTimeout, func() {
Convey("Works", func() {
now := time.Date(2016, 1, 1, 0, 0, 0, 0, time.UTC)
c, _ = testclock.UseTime(c, now)
- c, err := parseHeader(c, header(headerTimeout, "1M"))
+ c, err := parseHeader(c, header(prpccommon.HeaderTimeout, "1M"))
So(err, ShouldBeNil)
deadline, ok := c.Deadline()
@@ -159,9 +160,9 @@ func TestDecoding(t *testing.T) {
})
Convey("Fails", func() {
- c2, err := parseHeader(c, header(headerTimeout, "blah"))
+ c2, err := parseHeader(c, header(prpccommon.HeaderTimeout, "blah"))
So(c2, ShouldEqual, c)
- So(err, ShouldErrLike, headerTimeout+` header: unit is not recognized: "blah"`)
+ So(err, ShouldErrLike, prpccommon.HeaderTimeout+` header: unit is not recognized: "blah"`)
})
})
« no previous file with comments | « server/prpc/decoding.go ('k') | server/prpc/timeout.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698