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

Add trait to mock client dependency in DelayForwarder #1073

Merged
merged 3 commits into from
Jan 27, 2022

Conversation

octol
Copy link
Contributor

@octol octol commented Jan 26, 2022

  • Add trait for mocking the mixnode client dependency in the DelayForwarder.
  • Create basic test instantiating the DelayForwarder and pass it a packet.

A alternative approach here could be to move the entire Client behind a trait instead of strictly what's needed for testing.

Copy link
Contributor

@jstuczyn jstuczyn left a comment

Choose a reason for hiding this comment

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

Conceptually looks good to me. The only thing I'm maybe uncertain of is the name of the trait, i.e. SendWithoutResponse. I've been kinda liberally using send, send_with_response and send_without_response in multiple places, so I'm not sure if it might not be confusing later on. But I guess that's the problem for the future once other parts of the codebase are looked at.

@octol octol merged commit 1368ab1 into develop Jan 27, 2022
@octol octol deleted the feature/setup-test-for-delay-forwarder branch January 27, 2022 14:34
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.

None yet

3 participants