Skip to content

Commit fe36b7c

Browse files
committed
chore: update unit tests
1 parent f20facb commit fe36b7c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/generic/thrift/raw_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func TestRawWriter_Write(t *testing.T) {
6363

6464
// normal message
6565
buf = buf[:0]
66+
out = bufiox.NewBytesWriter(&buf)
6667
err = w.Write(context.Background(), out, []byte("hello world"), "method", true, nil)
6768
test.Assert(t, err == nil)
6869
err = out.Flush()

pkg/remote/codec/thrift/codec_apache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestGetSkippedStructBuffer(t *testing.T) {
5050
_, err = skipThriftStruct(trans)
5151
test.Assert(t, err != nil, err)
5252
test.Assert(t, strings.Contains(err.Error(), "skipThriftStruct"))
53-
test.Assert(t, strings.Contains(err.Error(), "EOF"))
53+
test.Assert(t, strings.Contains(err.Error(), "EOF") || strings.Contains(err.Error(), "no remaining data"))
5454
}
5555

5656
func TestApacheMarshalUnmarshal(t *testing.T) {

0 commit comments

Comments
 (0)