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

Make the Discovery throtling configurable to allow easier testing. #4565

Closed
krasi-georgiev opened this Issue Aug 30, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@krasi-georgiev
Copy link
Member

krasi-georgiev commented Aug 30, 2018

ticker := time.NewTicker(5 * time.Second)

Sending the discovery updates are hard coded to throttle at 5 seconds.
This makes creaating test for these parts of the code needing to wait 5 seconds so not good for unit testing. We need to make this somehow configurable so that we can adjust when creating unit tests.

With this change to the same PR can also add a test for:

  • blocked or no updates when the receiver's channel is full - #4523 (comment)
  • send updates only when there was an actual change in the targets - #4545

@simonpasquier simonpasquier changed the title Make the Discovery throtling configurable to allow easyer testing. Make the Discovery throtling configurable to allow easier testing. Sep 5, 2018

@janickic

This comment has been minimized.

Copy link
Contributor

janickic commented Sep 6, 2018

I'm going to try to fix this.

@lock lock bot locked and limited conversation to collaborators Mar 26, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.