[Issue-148][pulsar-client-go] add seek by messageID#168
Merged
wolfstudy merged 5 commits intoapache:masterfrom Feb 3, 2020
Merged
[Issue-148][pulsar-client-go] add seek by messageID#168wolfstudy merged 5 commits intoapache:masterfrom
wolfstudy merged 5 commits intoapache:masterfrom
Conversation
Member
|
@stevenwangnarvar Is it possible to split this pull request?
|
wolfstudy
requested changes
Jan 8, 2020
Member
wolfstudy
left a comment
There was a problem hiding this comment.
The check of golanglint-ci fail, please fix them.
you can run golangci-lint run -c ./golangci.yml ./... in locally.
pulsar/test_helper.go:201:1: context.Context should be the first parameter of a function (golint)
func send(t *testing.T, producer Producer, ctx context.Context, times int, message *ProducerMessage) {
^
pulsar/test_helper.go:216:1: context.Context should be the first parameter of a function (golint)
func receive(t *testing.T, consumer Consumer, ctx context.Context, times int, inspect func(*testing.T, Message, int)) {
^
pulsar/test_helper.go:25: File is not `goimports`-ed (goimports)
"github.com/stretchr/testify/assert"
pulsar/consumer_test.go:56: File is not `goimports`-ed (goimports)
msgProperties := map[string]string{ "key-1": "pulsar-1" }
cckellogg
reviewed
Jan 8, 2020
| func (c *consumer) Seek(msgID MessageID) error { | ||
| mid, ok := c.messageID(msgID) | ||
| if !ok { | ||
| return nil |
Contributor
There was a problem hiding this comment.
Shouldn't we return an error here?
There was a problem hiding this comment.
I checked other interfaces like Ack and NackID, they didn't handle error, because their interface didn't need return error, but I am not sure the correct behavior here. so I follow the current way.
seek by messageID
Member
|
retest this please |
Done. |
cckellogg
reviewed
Jan 13, 2020
wolfstudy
approved these changes
Jan 19, 2020
Member
wolfstudy
left a comment
There was a problem hiding this comment.
Nice work, thanks @stevenwangnarvar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Master Issue: #148
Motivation
Add seek by messageID
Modifications
Add seek by messageID
Refactor some UT code
Verifying this change
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation