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

Permit setting version on mock produce response #999

Merged
merged 2 commits into from
Jan 4, 2018

Conversation

fgrosse
Copy link
Contributor

@fgrosse fgrosse commented Dec 6, 2017

This allows setting the version of the message data struct for
MockProduceResponse. This change is very similar to what was already
done in pull request #939

In order to mock a "produce" request for Kafka version 0.10.2.0 you
would use the following:

leader.SetHandlerByMap(map[string]MockResponse{
	"ProduceRequest": NewMockProduceResponse(t).
		SetVersion(2).
		SetError("my_topic", 0, ErrNoError),
})

@eapache
Copy link
Contributor

eapache commented Dec 8, 2017

This PR looks fine to me, but CI is complaining about the formatting?

This allows setting the version of the message data struct for
MockProduceResponse. This change is very similar to what was already
done in pull request IBM#939

In order to mock a "produce" request for Kafka version 0.10.2.0 you
would use the following:

    leader.SetHandlerByMap(map[string]MockResponse{
    	"ProduceRequest": NewMockProduceResponse(t).
    		SetVersion(2).
    		SetError("my_topic", 0, ErrNoError),
    })
@fgrosse
Copy link
Contributor Author

fgrosse commented Jan 4, 2018

Sorry for the late reply.
I rebased the branch on to the current master and fixed formatting.

@eapache
Copy link
Contributor

eapache commented Jan 4, 2018

Thanks

@eapache eapache merged commit f0c3255 into IBM:master Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants