Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export FakeFrame.Arg2KVIterator to faciliate tests #757

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions testutils/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type FakeCallFrame struct {
Arg2StartOffsetVal, Arg2EndOffsetVal int
IsArg2Fragmented bool

arg2KVIterator arg2.KeyValIterator
Arg2KVIterator arg2.KeyValIterator
hasArg2KVIterator error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to export hasArg2KVIterator as well.

}

Expand Down Expand Up @@ -146,7 +146,7 @@ func (f FakeCallFrame) Arg2EndOffset() (int, bool) {
// Arg2Iterator returns the iterator for reading Arg2 key value pair
// of TChannel-Thrift Arg Scheme.
func (f FakeCallFrame) Arg2Iterator() (arg2.KeyValIterator, error) {
return f.arg2KVIterator, f.hasArg2KVIterator
return f.Arg2KVIterator, f.hasArg2KVIterator
}

// CopyCallFrame copies the relay.CallFrame and returns a FakeCallFrame with
Expand All @@ -163,7 +163,7 @@ func CopyCallFrame(f relay.CallFrame) FakeCallFrame {
Arg2StartOffsetVal: f.Arg2StartOffset(),
Arg2EndOffsetVal: endOffset,
IsArg2Fragmented: hasMore,
arg2KVIterator: copyIterator,
Arg2KVIterator: copyIterator,
hasArg2KVIterator: err,
}
}
Expand Down