diff --git a/encoding/thrift/outbound_nowire_test.go b/encoding/thrift/outbound_nowire_test.go index 194212aed..369d5635f 100644 --- a/encoding/thrift/outbound_nowire_test.go +++ b/encoding/thrift/outbound_nowire_test.go @@ -34,6 +34,7 @@ import ( "go.uber.org/thriftrw/protocol" tbinary "go.uber.org/thriftrw/protocol/binary" "go.uber.org/thriftrw/protocol/stream" + "go.uber.org/thriftrw/thrifttest" "go.uber.org/thriftrw/thrifttest/streamtest" "go.uber.org/thriftrw/wire" "go.uber.org/yarpc/api/transport" @@ -319,6 +320,17 @@ func TestNoWireClientOneway(t *testing.T) { } } +func TestNoNewWireBadProtocolConfig(t *testing.T) { + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + proto := thrifttest.NewMockProtocol(mockCtrl) + assert.Panics(t, + func() { + NewNoWire(Config{}, Protocol(proto)) + }) +} + // encodeThriftString prefixes the passed in string with an int32 that contains // the length of the string, compliant to the Thrift protocol. func encodeThriftString(t *testing.T, s string) string {